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

@@ -4,9 +4,8 @@ import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/delivery_address/model/delivery_address_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';
@@ -104,24 +103,20 @@ class _DeliveryAddressEditorState extends State<DeliveryAddressEditor> {
return LocalProgress(
inAsyncCall: _isLoading,
child: Scaffold(
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();
}
},
),
appBar: LocalAppBar(
labelKey: 'delivery_address',
backgroundColor: Colors.white,
shadowColor: Colors.transparent,
title: LocalText(context, 'delivery_address',
color: primaryColor, fontSize: 18),
labelColor: primaryColor,
arrowColor: primaryColor,
onBack: () {
if (isDataChanged()) {
showConfirmDialog(context, "back.button_confirm", () {
Navigator.of(context).pop();
});
} else {
Navigator.of(context).pop();
}
},
actions: [
_isNew
? Container()

View File

@@ -2,6 +2,7 @@ import 'package:fcs/domain/vo/delivery_address.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/delivery_address/delivery_address_editor.dart';
import 'package:fcs/pages/main/util.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';
@@ -15,7 +16,7 @@ class DeliveryAddressList extends StatefulWidget {
final bool isAdminCreation;
final DeliveryAddress? deliveryAddress;
const DeliveryAddressList(
{Key? key, this.isAdminCreation = false, this.deliveryAddress})
{Key? key, this.isAdminCreation = false, this.deliveryAddress})
: super(key: key);
@override
_DeliveryAddressListState createState() => _DeliveryAddressListState();
@@ -41,17 +42,11 @@ class _DeliveryAddressListState extends State<DeliveryAddressList> {
return LocalProgress(
inAsyncCall: _isLoading,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
leading: new IconButton(
icon: new Icon(CupertinoIcons.back, color: primaryColor),
onPressed: () => Navigator.of(context).pop(),
),
backgroundColor: Colors.white,
shadowColor: Colors.transparent,
title: LocalText(context, 'delivery_addresses',
color: primaryColor, fontSize: 20),
),
appBar: LocalAppBar(
labelKey: 'delivery_addresses',
backgroundColor: Colors.white,
labelColor: primaryColor,
arrowColor: primaryColor),
floatingActionButton: FloatingActionButton.extended(
onPressed: () {
Navigator.of(context).push(CupertinoPageRoute(