Make responsive great again (all app)

This commit is contained in:
poka 2021-02-28 18:28:43 +01:00
parent 723e7f1312
commit 42482fb579
4 changed files with 61 additions and 37 deletions

View File

@ -14,6 +14,7 @@ import 'package:flutter/material.dart';
import 'package:graphql_flutter/graphql_flutter.dart'; import 'package:graphql_flutter/graphql_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:responsive_framework/responsive_framework.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:catcher/catcher.dart'; import 'package:catcher/catcher.dart';
@ -102,21 +103,34 @@ class Gecko extends StatelessWidget {
ChangeNotifierProvider(create: (_) => CesiumPlusProvider()) ChangeNotifierProvider(create: (_) => CesiumPlusProvider())
], ],
child: GraphQLProvider( child: GraphQLProvider(
client: _client, client: _client,
child: MaterialApp( child: MaterialApp(
navigatorKey: Catcher.navigatorKey, builder: (context, widget) => ResponsiveWrapper.builder(
title: 'Ğecko', BouncingScrollWrapper.builder(context, widget),
theme: ThemeData( maxWidth: 1200,
primaryColor: Color(0xffFFD58D), minWidth: 480,
accentColor: Colors.grey[850], defaultScale: true,
textTheme: TextTheme( breakpoints: [
bodyText1: TextStyle(), ResponsiveBreakpoint.resize(480, name: MOBILE),
bodyText2: TextStyle(), ResponsiveBreakpoint.autoScale(800, name: TABLET),
).apply( ResponsiveBreakpoint.resize(1000, name: DESKTOP),
bodyColor: Color(0xff855F2D), ],
), background: Container(color: Color(0xFFF5F5F5))),
navigatorKey: Catcher.navigatorKey,
title: 'Ğecko',
theme: ThemeData(
primaryColor: Color(0xffFFD58D),
accentColor: Colors.grey[850],
textTheme: TextTheme(
bodyText1: TextStyle(),
bodyText2: TextStyle(),
).apply(
bodyColor: Color(0xff855F2D),
), ),
home: HomeScreen(), ),
))); home: HomeScreen(),
initialRoute: "/",
),
));
} }
} }

View File

@ -126,7 +126,7 @@ class HomeScreen extends StatelessWidget {
}, },
child: Column(children: <Widget>[ child: Column(children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only(top: 22), padding: EdgeInsets.only(top: 20),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
@ -134,22 +134,24 @@ class HomeScreen extends StatelessWidget {
Image( Image(
image: image:
AssetImage('assets/icon/gecko_final.png'), AssetImage('assets/icon/gecko_final.png'),
height: 160), height: 180),
])), ])),
Padding( Padding(
padding: EdgeInsets.only(top: 12), padding: EdgeInsets.only(top: 15),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Text( Text(
"Lapplication de paiement Ğ1\nplus mobile quun lésard du Vietnam", "y'a pas de lézard !",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Colors.black, fontSize: 15), color: Colors.black,
fontSize: 17,
fontStyle: FontStyle.italic),
) )
])), ])),
Padding( Padding(
padding: EdgeInsets.only(top: 40), padding: EdgeInsets.only(top: 60),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
@ -162,11 +164,11 @@ class HomeScreen extends StatelessWidget {
splashColor: Color( splashColor: Color(
0xffD28928), // inkwell color 0xffD28928), // inkwell color
child: Padding( child: Padding(
padding: EdgeInsets.all(17), padding: EdgeInsets.all(22),
child: Image( child: Image(
image: AssetImage( image: AssetImage(
'assets/qrcode-scan.png'), 'assets/qrcode-scan.png'),
height: 50)), height: 60)),
onTap: () async { onTap: () async {
await _historyProvider await _historyProvider
.scan(context); .scan(context);
@ -185,17 +187,17 @@ class HomeScreen extends StatelessWidget {
], ],
), ),
), ),
SizedBox(height: 10), SizedBox(height: 12),
Text( Text(
"Payer par QR-Code", "Payer par QR-Code",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Colors.black, fontSize: 13), color: Colors.black, fontSize: 16),
) )
]) ])
])), ])),
Padding( Padding(
padding: EdgeInsets.only(top: 40), padding: EdgeInsets.only(top: 50),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
@ -209,11 +211,11 @@ class HomeScreen extends StatelessWidget {
0xffD28928), // inkwell color 0xffD28928), // inkwell color
child: Padding( child: Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 18, vertical: 14), horizontal: 20, vertical: 16),
child: Image( child: Image(
image: AssetImage( image: AssetImage(
'assets/blockchain.png'), 'assets/blockchain.png'),
height: 55)), height: 70)),
onTap: () { onTap: () {
// Navigator.push( // Navigator.push(
// context, // context,
@ -237,15 +239,15 @@ class HomeScreen extends StatelessWidget {
], ],
), ),
), ),
SizedBox(height: 10), SizedBox(height: 12),
Text( Text(
"Explorer\n", "Explorer\n",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Colors.black, fontSize: 13), color: Colors.black, fontSize: 16),
) )
]), ]),
SizedBox(width: 100), SizedBox(width: 140),
Column(children: <Widget>[ Column(children: <Widget>[
Container( Container(
child: ClipOval( child: ClipOval(
@ -255,11 +257,11 @@ class HomeScreen extends StatelessWidget {
splashColor: Color( splashColor: Color(
0xffD28928), // inkwell color 0xffD28928), // inkwell color
child: Padding( child: Padding(
padding: EdgeInsets.all(20), padding: EdgeInsets.all(23),
child: Image( child: Image(
image: AssetImage( image: AssetImage(
'assets/lock.png'), 'assets/lock.png'),
height: 45)), height: 57)),
onTap: () { onTap: () {
isWalletsExists isWalletsExists
? Navigator.push( ? Navigator.push(
@ -289,12 +291,12 @@ class HomeScreen extends StatelessWidget {
], ],
), ),
), ),
SizedBox(height: 10), SizedBox(height: 12),
Text( Text(
"Gérer mes\nportefeuilles", "Gérer mes\nportefeuilles",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Colors.black, fontSize: 13), color: Colors.black, fontSize: 16),
) )
]) ])
])) ]))

View File

@ -576,6 +576,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.21" version: "0.2.21"
responsive_framework:
dependency: "direct main"
description:
name: responsive_framework
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.14"
rxdart: rxdart:
dependency: transitive dependency: transitive
description: description:

View File

@ -5,7 +5,7 @@ description: A new Flutter project.
# pub.dev using `pub publish`. This is preferred for private packages. # pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.0.1+18 version: 0.0.1+19
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@ -39,6 +39,7 @@ dependencies:
sentry_flutter: ^4.0.4 sentry_flutter: ^4.0.4
catcher: ^0.4.1 catcher: ^0.4.1
bubble: ^1.1.9+1 bubble: ^1.1.9+1
responsive_framework: ^0.0.14
flutter_icons: flutter_icons:
android: "ic_launcher" android: "ic_launcher"
@ -60,4 +61,4 @@ flutter:
- assets/ - assets/
- assets/icon/ - assets/icon/
- assets/onBoarding/ - assets/onBoarding/
- assets/onBoarding/progress_bar/ - assets/onBoarding/progress_bar/