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

@@ -3,9 +3,8 @@ import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/payment_methods/model/payment_method_model.dart';
import 'package:fcs/pages/main/util.dart';
import 'package:fcs/pages/widgets/input_text.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/local_app_bar.dart';
import 'package:fcs/pages/widgets/progress.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
import 'package:provider/provider.dart';
@@ -55,28 +54,20 @@ class _PaymentMethodEditorState extends State<PaymentMethodEditor> {
inAsyncCall: _isLoading,
child: Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
centerTitle: true,
leading: new IconButton(
icon: new Icon(CupertinoIcons.back, color: primaryColor),
onPressed: () {
if (isDataChanged()) {
showConfirmDialog(context, "back.button_confirm", () {
Navigator.of(context).pop();
});
} else {
Navigator.of(context).pop();
}
},
),
title: LocalText(
context,
isNew ? "pm.form.new" : "pm.update",
fontSize: 20,
color: primaryColor,
),
shadowColor: Colors.transparent,
appBar: LocalAppBar(
labelKey: isNew ? "pm.form.new" : "pm.update",
backgroundColor: Colors.white,
labelColor: primaryColor,
arrowColor: primaryColor,
onBack: () {
if (isDataChanged()) {
showConfirmDialog(context, "back.button_confirm", () {
Navigator.of(context).pop();
});
} else {
Navigator.of(context).pop();
}
},
actions: <Widget>[
isNew
? Container()

View File

@@ -5,6 +5,7 @@ import 'package:fcs/pages/payment_methods/model/payment_method_model.dart';
import 'package:fcs/pages/payment_methods/payment_method_editor.dart';
import 'package:fcs/pages/main/util.dart';
import 'package:fcs/pages/widgets/display_text.dart';
import 'package:fcs/pages/widgets/local_app_bar.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/progress.dart';
import 'package:flutter/cupertino.dart';
@@ -31,25 +32,11 @@ class _PaymentMethodPageState extends State<PaymentMethodPage> {
inAsyncCall: _isLoading,
child: Scaffold(
key: key,
appBar: AppBar(
leading: new IconButton(
icon: new Icon(
CupertinoIcons.back,
color: primaryColor,
),
onPressed: () => Navigator.of(context).pop(),
),
centerTitle: true,
title: LocalText(
context,
"pm.title",
fontSize: 20,
color: primaryColor,
),
shadowColor: Colors.transparent,
backgroundColor: Colors.white,
actions: <Widget>[],
),
appBar: LocalAppBar(
labelKey: "pm.title",
backgroundColor: Colors.white,
labelColor: primaryColor,
arrowColor: primaryColor),
body: Padding(
padding: const EdgeInsets.all(12.0),
child: ListView.separated(