add pagination for invoice and update ui for material 3

This commit is contained in:
tzw
2024-01-26 16:56:20 +06:30
parent 93a5fe071a
commit 8d0f712bf4
32 changed files with 351 additions and 635 deletions

View File

@@ -5,9 +5,9 @@ import 'package:fcs/domain/entities/auth_status.dart';
import 'package:fcs/pages/main/model/main_model.dart';
import 'package:fcs/pages/signin/signin_logic.dart';
import 'package:fcs/pages/main/util.dart';
import 'package:fcs/pages/widgets/local_app_bar.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/progress.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:pin_input_text_field/pin_input_text_field.dart';
import 'package:provider/provider.dart';
@@ -67,14 +67,7 @@ class _SmsCodePageState extends State<SmsCodePage> {
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,
),
appBar: LocalAppBar(),
body: ListView(
padding: EdgeInsets.only(top: 5, left: 5, right: 5),
children: <Widget>[
@@ -129,29 +122,21 @@ class _SmsCodePageState extends State<SmsCodePage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor:
canResend ? Colors.white : Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
side: BorderSide(
color: canResend
? primaryColor
: Colors.grey.shade400))),
onPressed: canResend ? _resend : null,
// color: canResend ? Colors.white : Colors.grey,
child: LocalText(context, 'sms.resend',
fontSize: 16,
color: canResend
? primaryColor
: Colors.grey.shade400),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10.0),
// side: BorderSide(
// color: canResend
// ? primaryColor
// : Colors.grey.shade400)),
),
style: ElevatedButton.styleFrom(
backgroundColor:
canResend ? Colors.white : Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
side: BorderSide(
color: canResend
? primaryColor
: Colors.grey.shade400))),
onPressed: canResend ? _resend : null,
child: LocalText(context, 'sms.resend',
fontSize: 16,
color: canResend
? primaryColor
: Colors.grey.shade400)),
InkWell(
onTap: allNumberEntered ? _verify : null,
child: CircleAvatar(
@@ -220,19 +205,4 @@ class _SmsCodePageState extends State<SmsCodePage> {
_isLoading = false;
});
}
_completeResend() {
setState(() {
_isLoading = false;
_start = resend_count_sec;
canResend = false;
startTimer();
});
}
_completeVerify() {
setState(() {
_isLoading = false;
});
}
}