import '/flutter_flow/flutter_flow_icon_button.
dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/flutter_flow_widgets.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'new_page_model.dart';
export 'new_page_model.dart';
class NewPageWidget extends StatefulWidget {
const NewPageWidget({super.key});
@override
State<NewPageWidget> createState() => _NewPageWidgetState();
class _NewPageWidgetState extends State<NewPageWidget> {
late NewPageModel _model;
final scaffoldKey = GlobalKey<ScaffoldState>();
@override
void initState() {
super.initState();
_model = createModel(context, () => NewPageModel());
@override
void dispose() {
_model.dispose();
super.dispose();
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
: FocusScope.of(context).unfocus(),
child: Scaffold(
key: scaffoldKey,
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
appBar: AppBar(
backgroundColor: FlutterFlowTheme.of(context).primary,
automaticallyImplyLeading: false,
title: Text(
'Gestion Fourrière',
style: FlutterFlowTheme.of(context).headlineMedium.override(
fontFamily: 'Outfit',
color: FlutterFlowTheme.of(context).info,
letterSpacing: 0,
),
),
actions: [
FlutterFlowIconButton(
buttonSize: 48,
icon: Icon(
Icons.notifications_none,
color: FlutterFlowTheme.of(context).info,
size: 24,
),
onPressed: () {
print('IconButton pressed ...');
},
),
],
centerTitle: false,
elevation: 0,
),
body: SafeArea(
top: true,
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(16, 0, 16, 0),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: double.infinity,
height: 200,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Color(0xFF1E88E5), Color(0xFF1565C0)],
stops: [0, 1],
begin: AlignmentDirectional(1, -1),
end: AlignmentDirectional(-1, 1),
),
borderRadius: BorderRadius.circular(16),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(24, 24, 24, 24),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Véhicules en Stock',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: Colors.white,
letterSpacing: 0,
),
),
Text(
'47',
style: FlutterFlowTheme.of(context)
.displaySmall
.override(
fontFamily: 'Outfit',
color: Colors.white,
letterSpacing: 0,
fontWeight: FontWeight.w600,
),
),
],
),
FlutterFlowIconButton(
borderRadius: 20,
buttonSize: 40,
fillColor: Color(0x33FFFFFF),
icon: Icon(
Icons.local_parking,
color: Colors.white,
size: 24,
),
onPressed: () {
print('IconButton pressed ...');
},
),
],
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Capacité: 65 places',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: Colors.white,
letterSpacing: 0,
),
),
Text(
'72% occupé',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: Colors.white,
letterSpacing: 0,
),
),
],
),
],
),
),
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 160,
height: 100,
decoration: BoxDecoration(
color:
FlutterFlowTheme.of(context).secondaryBackground,
borderRadius: BorderRadius.circular(16),
),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.add_location_alt,
color: FlutterFlowTheme.of(context).error,
size: 32,
),
Text(
'Nouvelle Demande',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
letterSpacing: 0,
),
),
].divide(SizedBox(height: 8)),
),
),
Container(
width: 160,
height: 100,
decoration: BoxDecoration(
color:
FlutterFlowTheme.of(context).secondaryBackground,
borderRadius: BorderRadius.circular(16),
),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.local_shipping,
color: FlutterFlowTheme.of(context).primary,
size: 32,
),
Text(
'Dépanneuses',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
letterSpacing: 0,
),
),
].divide(SizedBox(height: 8)),
),
),
],
),
Container(
width: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).secondaryBackground,
borderRadius: BorderRadius.circular(16),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(24, 24, 24, 24),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Demandes en cours',
style: FlutterFlowTheme.of(context)
.headlineSmall
.override(
fontFamily: 'Outfit',
letterSpacing: 0,
),
),
Text(
'Voir tout',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color:
FlutterFlowTheme.of(context).primary,
letterSpacing: 0,
),
),
],
),
ListView(
padding: EdgeInsets.zero,
primary: false,
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 48,
height: 48,
decoration: BoxDecoration(
color: Color(0xFFFFF5F5),
borderRadius:
BorderRadius.circular(24),
),
child: Icon(
Icons.directions_car,
color: FlutterFlowTheme.of(context)
.error,
size: 24,
),
),
Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Peugeot 208 - AB-123-CD',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
letterSpacing: 0,
),
),
Text(
'12 Rue de Paris, 75001',
style: FlutterFlowTheme.of(context)
.bodySmall
.override(
fontFamily: 'Readex Pro',
color: FlutterFlowTheme.of(
context)
.secondaryText,
letterSpacing: 0,
),
),
],
),
].divide(SizedBox(width: 12)),
),
Text(
'En attente',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: FlutterFlowTheme.of(context)
.error,
letterSpacing: 0,
),
),
],
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 48,
height: 48,
decoration: BoxDecoration(
color: Color(0xFFF0F8FF),
borderRadius:
BorderRadius.circular(24),
),
child: Icon(
Icons.local_shipping,
color: FlutterFlowTheme.of(context)
.primary,
size: 24,
),
),
Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Renault Clio - EF-456-GH',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
letterSpacing: 0,
),
),
Text(
'45 Avenue Victor Hugo, 75016',
style: FlutterFlowTheme.of(context)
.bodySmall
.override(
fontFamily: 'Readex Pro',
color: FlutterFlowTheme.of(
context)
.secondaryText,
letterSpacing: 0,
),
),
],
),
].divide(SizedBox(width: 12)),
),
Text(
'En cours',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: FlutterFlowTheme.of(context)
.primary,
letterSpacing: 0,
),
),
],
),
],
),
].divide(SizedBox(height: 16)),
),
),
),
Container(
width: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).secondaryBackground,
borderRadius: BorderRadius.circular(16),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(24, 24, 24, 24),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Text(
'Alertes Véhicules > 45 jours',
style: FlutterFlowTheme.of(context)
.headlineSmall
.override(
fontFamily: 'Outfit',
letterSpacing: 0,
),
),
ListView(
padding: EdgeInsets.zero,
primary: false,
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 48,
height: 48,
decoration: BoxDecoration(
color: Color(0xFFFFF3E0),
borderRadius:
BorderRadius.circular(24),
),
child: Icon(
Icons.warning_amber,
color: FlutterFlowTheme.of(context)
.warning,
size: 24,
),
),
Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'BMW Serie 3 - IJ-789-KL',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
letterSpacing: 0,
),
),
Text(
'48 jours - Emplacement A12',
style: FlutterFlowTheme.of(context)
.bodySmall
.override(
fontFamily: 'Readex Pro',
color: FlutterFlowTheme.of(
context)
.secondaryText,
letterSpacing: 0,
),
),
],
),
].divide(SizedBox(width: 12)),
),
FFButtonWidget(
onPressed: () {
print('Button pressed ...');
},
text: 'Action',
options: FFButtonOptions(
width: 80,
height: 32,
padding: EdgeInsetsDirectional.fromSTEB(
0, 0, 0, 0),
iconPadding:
EdgeInsetsDirectional.fromSTEB(
0, 0, 0, 0),
color:
FlutterFlowTheme.of(context).warning,
textStyle: FlutterFlowTheme.of(context)
.bodySmall
.override(
fontFamily: 'Readex Pro',
color: FlutterFlowTheme.of(context)
.info,
letterSpacing: 0,
),
elevation: 0,
borderRadius: BorderRadius.circular(16),
),
),
],
),
],
),
].divide(SizedBox(height: 16)),
),
),
),
Container(
width: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).secondaryBackground,
borderRadius: BorderRadius.circular(16),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(24, 24, 24, 24),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Text(
'Gestion des Profils',
style: FlutterFlowTheme.of(context)
.headlineSmall
.override(
fontFamily: 'Outfit',
letterSpacing: 0,
),
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 60,
height: 60,
decoration: BoxDecoration(
color: Color(0xFFE3F2FD),
borderRadius: BorderRadius.circular(30),
),
child: Icon(
Icons.person_add,
color:
FlutterFlowTheme.of(context).primary,
size: 30,
),
),
Text(
'Ajouter',
style: FlutterFlowTheme.of(context)
.bodySmall
.override(
fontFamily: 'Readex Pro',
letterSpacing: 0,
),
),
].divide(SizedBox(height: 8)),
),
Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 60,
height: 60,
decoration: BoxDecoration(
color: Color(0xFFE3F2FD),
borderRadius: BorderRadius.circular(30),
),
child: Icon(
Icons.manage_accounts,
color:
FlutterFlowTheme.of(context).primary,
size: 30,
),
),
Text(
'Gérer',
style: FlutterFlowTheme.of(context)
.bodySmall
.override(
fontFamily: 'Readex Pro',
letterSpacing: 0,
),
),
].divide(SizedBox(height: 8)),
),
Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 60,
height: 60,
decoration: BoxDecoration(
color: Color(0xFFE3F2FD),
borderRadius: BorderRadius.circular(30),
),
child: Icon(
Icons.admin_panel_settings,
color:
FlutterFlowTheme.of(context).primary,
size: 30,
),
),
Text(
'Droits',
style: FlutterFlowTheme.of(context)
.bodySmall
.override(
fontFamily: 'Readex Pro',
letterSpacing: 0,
),
),
].divide(SizedBox(height: 8)),
),
],
),
].divide(SizedBox(height: 16)),
),
),
),
].divide(SizedBox(height: 24)),
),
),
),
),
),
);