update
This commit is contained in:
parent
cf2ce36f87
commit
50d2cba7f2
9 changed files with 156 additions and 83 deletions
|
|
@ -13,29 +13,38 @@ class ButtonWidget extends StatelessWidget {
|
|||
return ElevatedButton(
|
||||
style: outline == true
|
||||
? OutlinedButton.styleFrom(
|
||||
foregroundColor: Color.fromRGBO(0, 0, 0, 1), // text color
|
||||
side: const BorderSide(color: Color.fromRGBO(79, 51, 94, 1)), // border color
|
||||
foregroundColor: const Color.fromRGBO(0, 0, 0, 1),
|
||||
backgroundColor: Colors.transparent,
|
||||
side: const BorderSide(color: Color.fromRGBO(198, 133, 232, 1)),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12), // rounded corners
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
minimumSize: Size(MediaQuery.of(context).size.width - 96, 44), // minimum size
|
||||
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
)
|
||||
: ElevatedButton.styleFrom(
|
||||
foregroundColor: Color.fromRGBO(0, 0, 0, 1), // text color
|
||||
foregroundColor: const Color.fromRGBO(0, 0, 0, 1), // text color
|
||||
backgroundColor: const Color.fromRGBO(198, 133, 232, 1), // background color
|
||||
side: const BorderSide(color: Color.fromRGBO(79, 51, 94, 1)), // border color
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12), // rounded corners
|
||||
),
|
||||
minimumSize: Size(MediaQuery.of(context).size.width - 96, 44), // minimum size
|
||||
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
),
|
||||
onPressed: onPressed,
|
||||
child: Text(
|
||||
text,
|
||||
style: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 14)),
|
||||
style: _textStyle(outline),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TextStyle _textStyle(bool? outline) {
|
||||
if (outline == true) {
|
||||
return GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 14, color: Color.fromRGBO(198, 133, 232, 1)));
|
||||
} else {
|
||||
return GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 14, color: Color.fromRGBO(0, 0, 0, 1)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ class InputWidget extends StatelessWidget {
|
|||
children: [
|
||||
Text('$label:',
|
||||
style: GoogleFonts.outfit(
|
||||
textStyle: const TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500),
|
||||
textStyle:
|
||||
const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 12, fontWeight: FontWeight.w500),
|
||||
)),
|
||||
const Gap(8),
|
||||
TextField(
|
||||
|
|
|
|||
13
lib/widgets/snackbar_widget.dart
Normal file
13
lib/widgets/snackbar_widget.dart
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
void showNotification(BuildContext context, String text, bool isPositive) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(text),
|
||||
backgroundColor: isPositive ? const Color.fromRGBO(37, 106, 32, 1) : const Color.fromRGBO(188, 59, 50, 1),
|
||||
elevation: 4.0,
|
||||
behavior: SnackBarBehavior.floating,
|
||||
duration: const Duration(seconds: 3),
|
||||
),
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue