merge material 3

This commit is contained in:
tzw
2024-01-25 17:40:35 +06:30
parent 18053cbe3c
commit 991ecd7ae6
70 changed files with 572 additions and 1377 deletions

View File

@@ -20,7 +20,10 @@ Future showMsgDialog(BuildContext context, String title, String msg) {
content: new Text(msg),
actions: <Widget>[
new TextButton(
child: new Text("Close"),
child: new Text(
"Close",
style: TextStyle(color: primaryColor),
),
onPressed: () {
Navigator.of(context).pop();
},
@@ -52,14 +55,16 @@ Future<void> showConfirmDialog(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
TextButton(
style:
TextButton.styleFrom(backgroundColor: Colors.grey[300]),
// color: Colors.grey[300],
style: TextButton.styleFrom(
backgroundColor: Colors.grey[300],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0))),
child: Text(
AppTranslations.of(context)!.text('btn.cancel'),
style: Provider.of<LanguageModel>(context).isEng
? TextStyle()
: TextStyle(fontFamily: 'Myanmar3'),
? TextStyle(color: primaryColor)
: TextStyle(
fontFamily: 'Myanmar3', color: primaryColor),
),
onPressed: () {
Navigator.of(context).pop();
@@ -68,8 +73,10 @@ Future<void> showConfirmDialog(
width: 0,
),
TextButton(
style: TextButton.styleFrom(backgroundColor: primaryColor),
// color: primaryColor,
style: TextButton.styleFrom(
backgroundColor: primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0))),
child: Text(AppTranslations.of(context)!.text('btn.ok'),
style: Provider.of<LanguageModel>(context).isEng
? TextStyle(
@@ -374,7 +381,8 @@ String getLocalString(BuildContext context, String key) {
}
void showToast(GlobalKey key, String text) {
final ScaffoldMessengerState scaffold = key.currentState as ScaffoldMessengerState;
final ScaffoldMessengerState scaffold =
key.currentState as ScaffoldMessengerState;
scaffold.showSnackBar(
SnackBar(
content: Text(text),