add pagination for pages
This commit is contained in:
@@ -1,102 +0,0 @@
|
||||
import 'package:fcs/domain/entities/carton.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/localization/app_translations.dart';
|
||||
import 'package:fcs/pages/widgets/progress.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BoxAddition extends StatefulWidget {
|
||||
final Carton? box;
|
||||
BoxAddition({this.box});
|
||||
|
||||
@override
|
||||
_BoxAdditionState createState() => _BoxAdditionState();
|
||||
}
|
||||
|
||||
class _BoxAdditionState extends State<BoxAddition> {
|
||||
bool _isLoading = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
title: Text(AppTranslations.of(context)!.text("box.edit.title")),
|
||||
),
|
||||
body: Card(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: ListView(children: <Widget>[
|
||||
DropdownButtonFormField<Object>(
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Box Number',
|
||||
icon: Icon(Icons.pages)),
|
||||
items: [],
|
||||
// boxModel.processed
|
||||
// .map((e) => DropdownMenuItem(
|
||||
// child: Text(
|
||||
// '${e.shipmentNumber}-${e.receiverNumber} #${e.boxNumber}'),
|
||||
// value: e))
|
||||
// .toList(),
|
||||
onChanged: (map) => {},
|
||||
),
|
||||
]),
|
||||
)),
|
||||
widget.box == null
|
||||
? Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: primaryColor),
|
||||
child: Text(
|
||||
'Add box',
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
// color: primaryColor,
|
||||
// textColor: Colors.white,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
)))
|
||||
: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: primaryColor),
|
||||
child: Text('Save box',
|
||||
style: TextStyle(color: Colors.white)),
|
||||
// color: primaryColor,
|
||||
// textColor: Colors.white,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
))),
|
||||
SizedBox(
|
||||
height: 30,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user