mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-27 21:16:48 +00:00
* Add new models for SalesOrder - Create generic Order and OrderLine models with common functionality * Refactor - Move some widgets around - Cleanup directory structure * Add link to home screen and nav drawer * Add SalesOrder list widget * Linting fixes * Fix string * Refactor PurchaseOrderDetailWidget * Tweaks to existing code * linting * Fixes for drawer widget * Add "detail" page for SalesOrder * Add more tiles to SalesOrder detail * Allow editing of salesorder * add list filters for sales orders * Display list of line items * Customer updates - Display customer icon on home screen - Fetch sales orders for customer detail page * Cleanup company detail view * Create new sales order from list * Stricter typing for formFields method * Create new PurchaseOrder and SalesOrder from company deatil * Status code updates - Add function for name comparison - Remove hard-coded values * Update view permission checks for home widget * Add ability to manually add SalesOrderLineItem * Add nice progress bar widgets * Display detail view for sales order line item * edit SalesOrderLineItem * Fix unused import * Hide "shipped items" tab - Will be added in a future update
77 lines
1.9 KiB
Dart
77 lines
1.9 KiB
Dart
|
|
import "dart:async';
|
|
|
|
import "package:flutter/foundation.dart';
|
|
import "package:flutter/material.dart';
|
|
// ignore_for_file: non_constant_identifier_names
|
|
// ignore_for_file: camel_case_types
|
|
// ignore_for_file: prefer_single_quotes
|
|
|
|
//This file is automatically generated. DO NOT EDIT, all your changes would be lost.
|
|
|
|
class S implements WidgetsLocalizations {
|
|
const S();
|
|
|
|
static const GeneratedLocalizationsDelegate delegate = GeneratedLocalizationsDelegate();
|
|
|
|
static S of(BuildContext context) => Localizations.of<S>(context, WidgetsLocalizations);
|
|
|
|
@override
|
|
TextDirection get textDirection => TextDirection.ltr;
|
|
|
|
}
|
|
|
|
class en extends S {
|
|
const en();
|
|
}
|
|
|
|
|
|
class GeneratedLocalizationsDelegate extends LocalizationsDelegate<WidgetsLocalizations> {
|
|
const GeneratedLocalizationsDelegate();
|
|
|
|
List<Locale> get supportedLocales {
|
|
return const <Locale>[
|
|
|
|
const Locale("en", ""),
|
|
|
|
];
|
|
}
|
|
|
|
LocaleResolutionCallback resolution({Locale fallback}) {
|
|
return (Locale locale, Iterable<Locale> supported) {
|
|
final Locale languageLocale = new Locale(locale.languageCode, "");
|
|
if (supported.contains(locale))
|
|
return locale;
|
|
else if (supported.contains(languageLocale))
|
|
return languageLocale;
|
|
else {
|
|
final Locale fallbackLocale = fallback ?? supported.first;
|
|
return fallbackLocale;
|
|
}
|
|
};
|
|
}
|
|
|
|
@override
|
|
Future<WidgetsLocalizations> load(Locale locale) {
|
|
final String lang = getLang(locale);
|
|
switch (lang) {
|
|
|
|
case "en":
|
|
return new SynchronousFuture<WidgetsLocalizations>(const en());
|
|
|
|
default:
|
|
return new SynchronousFuture<WidgetsLocalizations>(const S());
|
|
}
|
|
}
|
|
|
|
@override
|
|
bool isSupported(Locale locale) => supportedLocales.contains(locale);
|
|
|
|
@override
|
|
bool shouldReload(GeneratedLocalizationsDelegate old) => false;
|
|
}
|
|
|
|
String getLang(Locale l) => l.countryCode != null && l.countryCode.isEmpty
|
|
? l.languageCode
|
|
: l.toString();
|