Skip to content
Snippets Groups Projects
Commit 42482fb5 authored by poka's avatar poka
Browse files

Make responsive great again (all app)

parent 723e7f13
No related branches found
No related tags found
1 merge request!6Figma onboarding workflow
...@@ -14,6 +14,7 @@ import 'package:flutter/material.dart'; ...@@ -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';
...@@ -104,6 +105,17 @@ class Gecko extends StatelessWidget { ...@@ -104,6 +105,17 @@ class Gecko extends StatelessWidget {
child: GraphQLProvider( child: GraphQLProvider(
client: _client, client: _client,
child: MaterialApp( child: MaterialApp(
builder: (context, widget) => ResponsiveWrapper.builder(
BouncingScrollWrapper.builder(context, widget),
maxWidth: 1200,
minWidth: 480,
defaultScale: true,
breakpoints: [
ResponsiveBreakpoint.resize(480, name: MOBILE),
ResponsiveBreakpoint.autoScale(800, name: TABLET),
ResponsiveBreakpoint.resize(1000, name: DESKTOP),
],
background: Container(color: Color(0xFFF5F5F5))),
navigatorKey: Catcher.navigatorKey, navigatorKey: Catcher.navigatorKey,
title: 'Ğecko', title: 'Ğecko',
theme: ThemeData( theme: ThemeData(
...@@ -117,6 +129,8 @@ class Gecko extends StatelessWidget { ...@@ -117,6 +129,8 @@ class Gecko extends StatelessWidget {
), ),
), ),
home: HomeScreen(), home: HomeScreen(),
))); initialRoute: "/",
),
));
} }
} }
...@@ -126,7 +126,7 @@ class HomeScreen extends StatelessWidget { ...@@ -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 { ...@@ -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(
"L’application de paiement Ğ1\nplus mobile qu’unsard du Vietnam", "y'a pas dezard !",
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 { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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),
) )
]) ])
])) ]))
......
...@@ -576,6 +576,13 @@ packages: ...@@ -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:
......
...@@ -5,7 +5,7 @@ description: A new Flutter project. ...@@ -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: ...@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment