mirror of
https://github.com/inventree/inventree-app.git
synced 2025-07-01 19:30:44 +00:00
Format Code and Add Format Checks to CI (#643)
* Remove unused lib/generated/i18n.dart * Use `fvm dart format .` * Add contributing guidelines * Enforce dart format * Add `dart format off` directive to generated files
This commit is contained in:
@ -16,15 +16,11 @@ import "package:inventree/settings/sales_order_settings.dart";
|
||||
|
||||
// InvenTree settings view
|
||||
class InvenTreeSettingsWidget extends StatefulWidget {
|
||||
|
||||
@override
|
||||
_InvenTreeSettingsState createState() => _InvenTreeSettingsState();
|
||||
|
||||
}
|
||||
|
||||
|
||||
class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
||||
|
||||
final _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
/*
|
||||
@ -32,8 +28,10 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
||||
*/
|
||||
Future<void> _about() async {
|
||||
PackageInfo.fromPlatform().then((PackageInfo info) {
|
||||
Navigator.push(context,
|
||||
MaterialPageRoute(builder: (context) => InvenTreeAboutWidget(info)));
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => InvenTreeAboutWidget(info)),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@ -48,72 +46,108 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
||||
body: Center(
|
||||
child: ListView(
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text(L10().server),
|
||||
subtitle: Text(L10().configureServer),
|
||||
leading: Icon(TablerIcons.server, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeSelectServerWidget()));
|
||||
},
|
||||
),
|
||||
Divider(),
|
||||
ListTile(
|
||||
title: Text(L10().appSettings),
|
||||
subtitle: Text(L10().appSettingsDetails),
|
||||
leading: Icon(TablerIcons.settings, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeAppSettingsWidget()));
|
||||
}
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().homeScreen),
|
||||
subtitle: Text(L10().homeScreenSettings),
|
||||
leading: Icon(TablerIcons.home, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => HomeScreenSettingsWidget()));
|
||||
}
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().barcodes),
|
||||
subtitle: Text(L10().barcodeSettings),
|
||||
leading: Icon(TablerIcons.barcode, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeBarcodeSettingsWidget()));
|
||||
}
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().part),
|
||||
subtitle: Text(L10().partSettings),
|
||||
leading: Icon(TablerIcons.box, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreePartSettingsWidget()));
|
||||
}
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().purchaseOrder),
|
||||
subtitle: Text(L10().purchaseOrderSettings),
|
||||
leading: Icon(TablerIcons.shopping_cart, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreePurchaseOrderSettingsWidget()));
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().salesOrder),
|
||||
subtitle: Text(L10().salesOrderSettings),
|
||||
leading: Icon(TablerIcons.truck, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeSalesOrderSettingsWidget()));
|
||||
},
|
||||
),
|
||||
Divider(),
|
||||
ListTile(
|
||||
title: Text(L10().about),
|
||||
leading: Icon(TablerIcons.info_circle, color: COLOR_ACTION),
|
||||
onTap: _about,
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
ListTile(
|
||||
title: Text(L10().server),
|
||||
subtitle: Text(L10().configureServer),
|
||||
leading: Icon(TablerIcons.server, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => InvenTreeSelectServerWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Divider(),
|
||||
ListTile(
|
||||
title: Text(L10().appSettings),
|
||||
subtitle: Text(L10().appSettingsDetails),
|
||||
leading: Icon(TablerIcons.settings, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => InvenTreeAppSettingsWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().homeScreen),
|
||||
subtitle: Text(L10().homeScreenSettings),
|
||||
leading: Icon(TablerIcons.home, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => HomeScreenSettingsWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().barcodes),
|
||||
subtitle: Text(L10().barcodeSettings),
|
||||
leading: Icon(TablerIcons.barcode, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => InvenTreeBarcodeSettingsWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().part),
|
||||
subtitle: Text(L10().partSettings),
|
||||
leading: Icon(TablerIcons.box, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => InvenTreePartSettingsWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().purchaseOrder),
|
||||
subtitle: Text(L10().purchaseOrderSettings),
|
||||
leading: Icon(TablerIcons.shopping_cart, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
InvenTreePurchaseOrderSettingsWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().salesOrder),
|
||||
subtitle: Text(L10().salesOrderSettings),
|
||||
leading: Icon(TablerIcons.truck, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => InvenTreeSalesOrderSettingsWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Divider(),
|
||||
ListTile(
|
||||
title: Text(L10().about),
|
||||
leading: Icon(TablerIcons.info_circle, color: COLOR_ACTION),
|
||||
onTap: _about,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user