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

@@ -24,6 +24,8 @@ class _CargoTableState extends State<CargoTable> {
headingRowHeight: 40,
columnSpacing: 50,
showCheckboxColumn: false,
decoration: BoxDecoration(border: Border.all(color: Colors.white)),
border: TableBorder(horizontalInside: BorderSide(color: Colors.white)),
columns: [
DataColumn(
label: LocalText(

View File

@@ -39,14 +39,14 @@ class _CargoTableState extends State<CargoTable> {
@override
Widget build(BuildContext context) {
print("Cargotypes:${cargoTypes!.length}");
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: DataTable(
showCheckboxColumn: false,
headingRowHeight: 40,
columnSpacing: 40,
decoration: BoxDecoration(border: Border.all(color: Colors.white)),
border: TableBorder(horizontalInside: BorderSide(color: Colors.white)),
columns: [
DataColumn(
label: LocalText(

View File

@@ -20,6 +20,7 @@ import 'package:fcs/pages/widgets/delivery_address_selection.dart';
import 'package:fcs/pages/widgets/display_text.dart';
import 'package:fcs/pages/widgets/fcs_id_icon.dart';
import 'package:fcs/pages/widgets/length_picker.dart';
import 'package:fcs/pages/widgets/local_app_bar.dart';
import 'package:fcs/pages/widgets/local_button.dart';
import 'package:fcs/pages/widgets/local_dropdown.dart';
import 'package:fcs/pages/widgets/local_radio_buttons.dart';
@@ -531,21 +532,11 @@ class _CartonEditorState extends State<CartonEditor> {
return LocalProgress(
inAsyncCall: _isLoading,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
leading: new IconButton(
icon:
new Icon(CupertinoIcons.back, color: primaryColor, size: 30),
onPressed: () => Navigator.of(context).pop()),
shadowColor: Colors.transparent,
backgroundColor: Colors.white,
title: LocalText(
context,
_isNew ? "box.info.title" : "box.edit.title",
fontSize: 20,
color: primaryColor,
),
),
appBar: LocalAppBar(
labelKey: _isNew ? "box.info.title" : "box.edit.title",
backgroundColor: Colors.white,
arrowColor: primaryColor,
labelColor: primaryColor),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: ListView(

View File

@@ -11,6 +11,7 @@ import 'package:fcs/pages/widgets/defalut_delivery_address.dart';
import 'package:fcs/pages/widgets/display_text.dart';
import 'package:fcs/pages/widgets/fcs_id_icon.dart';
import 'package:fcs/pages/widgets/length_picker.dart';
import 'package:fcs/pages/widgets/local_app_bar.dart';
import 'package:fcs/pages/widgets/local_radio_buttons.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/local_title.dart';
@@ -311,20 +312,11 @@ class _CartonInfoState extends State<CartonInfo> {
return LocalProgress(
inAsyncCall: _isLoading,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
leading: new IconButton(
icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30),
onPressed: () => Navigator.of(context).pop(),
),
shadowColor: Colors.transparent,
appBar: LocalAppBar(
labelKey: "box.info.title",
backgroundColor: Colors.white,
title: LocalText(
context,
"box.info.title",
fontSize: 20,
color: primaryColor,
),
labelColor: primaryColor,
arrowColor: primaryColor,
actions: isEdiable
? <Widget>[
IconButton(

View File

@@ -1,5 +1,6 @@
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/carton/model/carton_model.dart';
import 'package:fcs/pages/widgets/local_app_bar.dart';
import 'package:fcs/pages/widgets/local_popup_menu_button.dart';
import 'package:fcs/pages/widgets/local_popupmenu.dart';
import 'package:fcs/pages/widgets/local_text.dart';
@@ -60,33 +61,20 @@ class _CartonListState extends State<CartonList> {
});
return LocalProgress(
inAsyncCall: _isLoading,
child: DefaultTabController(
length: 2,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
leading: new IconButton(
icon: new Icon(CupertinoIcons.back),
onPressed: () => Navigator.of(context).pop(),
),
backgroundColor: primaryColor,
title: LocalText(context, "boxes.name",
color: Colors.white, fontSize: 20),
actions: <Widget>[popupMenu],
),
floatingActionButton: FloatingActionButton.extended(
onPressed: () {
_newBox();
},
icon: Icon(Icons.add),
label: LocalText(context, "boxes.new", color: Colors.white),
backgroundColor: primaryColor,
),
body: PaginatorListView<Carton>(
paginatorListener: boxModel.getBoxes!,
rowBuilder: (p) => CartonListRow(box: p),
color: primaryColor),
child: Scaffold(
appBar: LocalAppBar(labelKey: "boxes.name", actions: [popupMenu]),
floatingActionButton: FloatingActionButton.extended(
onPressed: () {
_newBox();
},
icon: Icon(Icons.add),
label: LocalText(context, "boxes.new", color: Colors.white),
backgroundColor: primaryColor,
),
body: PaginatorListView<Carton>(
paginatorListener: boxModel.getBoxes!,
rowBuilder: (p) => CartonListRow(box: p),
color: primaryColor),
),
);
}

View File

@@ -29,7 +29,7 @@ class CartonListRow extends StatelessWidget {
children: <Widget>[
Expanded(
child: new Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0),
padding: const EdgeInsets.symmetric(vertical: 13.0),
child: new Row(
children: <Widget>[
Container(

View File

@@ -2,7 +2,6 @@ import 'package:fcs/domain/entities/package.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/local_title.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
typedef OnSelect = Function(Package package, bool checked);

View File

@@ -30,13 +30,9 @@ class CartonRow extends StatelessWidget {
child: new Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 5, right: 10),
child: Icon(
MaterialCommunityIcons.package,
color: primaryColor,
size: 30,
),
),
padding: EdgeInsets.only(left: 5, right: 10),
child: Icon(MaterialCommunityIcons.package,
color: primaryColor, size: 30)),
new Expanded(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,

View File

@@ -10,14 +10,18 @@ Widget getCartonNumberStatus(BuildContext context, Carton carton) {
LocalText(
context,
'',
text: carton.cartonNumber ,
text: carton.cartonNumber,
color: primaryColor,
fontSize: 18,
fontWeight: FontWeight.bold,
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Chip(label: Text(carton.status??"")),
child: Chip(
shape: const StadiumBorder(
side: BorderSide(color: Colors.transparent)),
backgroundColor: Colors.grey.withOpacity(0.3),
label: Text(carton.status ?? "")),
),
],
);