ajustes nas telas configurações

This commit is contained in:
Reginaldo
2023-04-14 17:25:14 -03:00
parent 3b83349259
commit a9b813f29a
45 changed files with 209 additions and 139 deletions

View File

@@ -0,0 +1,93 @@
import 'package:flutter/material.dart';
import 'package:rkm/config/const_variable.dart';
import 'package:rkm/widgets/button_default.dart';
import '../../config/color_palette.dart';
import '../../service/shared_preferences/shared_preferences_service.dart';
import '../../widgets/text_default.dart';
class SincDataScreen extends StatefulWidget {
const SincDataScreen({Key? key}) : super(key: key);
@override
State<SincDataScreen> createState() => _SincDataScreenState();
}
class _SincDataScreenState extends State<SincDataScreen> {
String mode ='';
dataSQLite()async{
final PrefService _preferences = PrefService();
_preferences.readCacheModel('user', 'password', 'city', 'mode').then((list){
setState(() {
mode = list[3];
});
});
}
@override
void initState() {
super.initState();
dataSQLite();
}
@override
Widget build(BuildContext context) {
double width = MediaQuery.of(context).size.width;
return Scaffold(
bottomSheet: Container(
color: ColorPalette.appBar,
child: Row(
children: [
Spacer(),
ButtonDefault(
title: 'Voltar',
width: width*0.2,
textColor: ColorPalette.white,
background: ColorPalette.appBar,
borderColor: ColorPalette.appBar,
onPressed: ()=>Navigator.pushNamedAndRemoveUntil(context, '/home', (Route<dynamic> route) => false),
)
],
),
),
body: Container(
padding: EdgeInsets.only(top: 100),
decoration: BoxDecoration(
color: ColorPalette.grayBackground,
image: DecorationImage(
fit: BoxFit.fitHeight,
image: AssetImage('assets/images/load_image.png'),
)
),
width: double.infinity,
height: double.infinity,
child: Column(
children: [
Image.asset('assets/images/logo.PNG',width: width*0.5,),
mode == 'homologacao'?Image.asset('assets/images/homologacao.png',width: width*0.4):Container(),
mode == 'desenvolvimento'?Image.asset('assets/images/desenvolvimento.png',width: width*0.4):Container(),
Padding(
padding: const EdgeInsets.symmetric(vertical: 5.0),
child: TextDefault(
text: 'A Sincronização poderá demorar. Prosseguir?',
color: ColorPalette.black54,
fontSize: 22,
fontWeigth: FontWeight.bold,
),
),
ButtonDefault(
title: 'Enviar informações',
width: width*0.9,
textColor: ColorPalette.white,
background: ColorPalette.appBar,
borderColor: ColorPalette.appBar,
onPressed: ()=>Navigator.pushReplacementNamed(context, '/home'),
)
],
),
),
);
}
}