clean up localization

This commit is contained in:
Thinzar Win
2020-10-07 18:49:28 +06:30
parent aeb0d22cd3
commit 99e4c08414
10 changed files with 373 additions and 1105 deletions

View File

@@ -2,6 +2,7 @@ import 'package:fcs/domain/entities/discount.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/localization/app_translations.dart';
import 'package:fcs/pages/main/util.dart';
import 'package:fcs/pages/widgets/input_text.dart';
import 'package:fcs/pages/widgets/progress.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
@@ -38,6 +39,16 @@ class _DiscountByWeightEditorState extends State<DiscountByWeightEditor> {
@override
Widget build(BuildContext context) {
final weightBox = InputText(
labelTextKey: 'rate.discount.weight',
iconData: FontAwesomeIcons.weightHanging,
controller: _weightController);
final discountRateBox = InputText(
labelTextKey: 'rate.discount.rate',
iconData: Icons.attach_money,
controller: _rateController);
return LocalProgress(
inAsyncCall: _isLoading,
child: Scaffold(
@@ -59,10 +70,8 @@ class _DiscountByWeightEditorState extends State<DiscountByWeightEditor> {
Expanded(
child: ListView(
children: <Widget>[
fcsInput("Weight", FontAwesomeIcons.weightHanging,
controller: _weightController),
fcsInput("Discount Rate", Icons.attach_money,
controller: _rateController),
weightBox,
discountRateBox,
SizedBox(height: 30),
],
),