123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- import 'package:flutter/material.dart';
- import 'package:flutter/widgets.dart';
- Widget nothingToSeeHere({Color textColor}) {
- return Center(
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Text(
- "Nothing to see here! 👀",
- style: TextStyle(
- color: textColor.withOpacity(0.35),
- ),
- ),
- ),
- );
- }
- Widget button(
- String text, {
- double fontSize = 14,
- VoidCallback onPressed,
- double lineHeight,
- EdgeInsets padding,
- }) {
- return InkWell(
- child: OutlinedButton(
- style: OutlinedButton.styleFrom(
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(8),
- ),
- padding: padding ?? EdgeInsets.fromLTRB(50, 16, 50, 16),
- textStyle: TextStyle(
- fontWeight: FontWeight.w600,
- fontFamily: 'Inter-SemiBold',
- fontSize: fontSize,
- height: lineHeight,
- ),
- ).copyWith(
- backgroundColor: MaterialStateProperty.resolveWith<Color>(
- (Set<MaterialState> states) {
- if (states.contains(MaterialState.disabled)) {
- return Colors.grey;
- }
- // return Color.fromRGBO(29, 184, 80, 1);
- return Colors.white;
- },
- ),
- foregroundColor: MaterialStateProperty.resolveWith<Color>(
- (Set<MaterialState> states) {
- if (states.contains(MaterialState.disabled)) {
- return Colors.white;
- }
- return Colors.black;
- },
- ),
- alignment: Alignment.center,
- ),
- child: Text(text),
- onPressed: onPressed,
- ),
- );
- }
- final emptyContainer = const SizedBox.shrink();
- Animatable<Color> passwordStrengthColors = TweenSequence<Color>(
- [
- TweenSequenceItem(
- weight: 1.0,
- tween: ColorTween(
- begin: Colors.red,
- end: Colors.yellow,
- ),
- ),
- TweenSequenceItem(
- weight: 1.0,
- tween: ColorTween(
- begin: Colors.yellow,
- end: Colors.lightGreen,
- ),
- ),
- TweenSequenceItem(
- weight: 1.0,
- tween: ColorTween(
- begin: Colors.lightGreen,
- end: Color.fromRGBO(45, 194, 98, 1.0),
- ),
- ),
- ],
- );
|