Skip to content
Snippets Groups Projects
Commit 6d69d039 authored by poka's avatar poka
Browse files

Improve responsive

parent 1b7c01bf
Branches
Tags
No related merge requests found
...@@ -154,10 +154,10 @@ class HomeScreen extends StatelessWidget { ...@@ -154,10 +154,10 @@ class HomeScreen extends StatelessWidget {
children: const <Widget>[ children: const <Widget>[
SizedBox(width: 7), SizedBox(width: 7),
Image( Image(
image: image: AssetImage('assets/icon/gecko_final.png'),
AssetImage('assets/icon/gecko_final.png'),
height: 180), height: 180),
])), ]),
),
Padding( Padding(
padding: const EdgeInsets.only(top: 15), padding: const EdgeInsets.only(top: 15),
child: Row( child: Row(
...@@ -171,9 +171,10 @@ class HomeScreen extends StatelessWidget { ...@@ -171,9 +171,10 @@ class HomeScreen extends StatelessWidget {
fontSize: 17, fontSize: 17,
fontStyle: FontStyle.italic), fontStyle: FontStyle.italic),
) )
])), ]),
),
Padding( Padding(
padding: const EdgeInsets.only(top: 60), padding: EdgeInsets.only(top: isTall ? 70 : 60),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -181,8 +182,7 @@ class HomeScreen extends StatelessWidget { ...@@ -181,8 +182,7 @@ class HomeScreen extends StatelessWidget {
Container( Container(
child: ClipOval( child: ClipOval(
child: Material( child: Material(
color: const Color( color: const Color(0xffFFD58D), // button color
0xffFFD58D), // button color
child: InkWell( child: InkWell(
splashColor: orangeC, // inkwell color splashColor: orangeC, // inkwell color
child: const Padding( child: const Padding(
...@@ -192,8 +192,7 @@ class HomeScreen extends StatelessWidget { ...@@ -192,8 +192,7 @@ class HomeScreen extends StatelessWidget {
'assets/qrcode-scan.png'), 'assets/qrcode-scan.png'),
height: 60)), height: 60)),
onTap: () async { onTap: () async {
await _historyProvider await _historyProvider.scan(context);
.scan(context);
}), }),
), ),
), ),
...@@ -213,11 +212,11 @@ class HomeScreen extends StatelessWidget { ...@@ -213,11 +212,11 @@ class HomeScreen extends StatelessWidget {
const Text( const Text(
"Payer par QR-Code", "Payer par QR-Code",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(color: Colors.black, fontSize: 16),
color: Colors.black, fontSize: 16),
) )
]) ])
])), ]),
),
Padding( Padding(
padding: const EdgeInsets.only(top: 50), padding: const EdgeInsets.only(top: 50),
child: Row( child: Row(
...@@ -227,16 +226,15 @@ class HomeScreen extends StatelessWidget { ...@@ -227,16 +226,15 @@ class HomeScreen extends StatelessWidget {
Container( Container(
child: ClipOval( child: ClipOval(
child: Material( child: Material(
color: const Color( color: const Color(0xffFFD58D), // button color
0xffFFD58D), // button color
child: InkWell( child: InkWell(
splashColor: orangeC, // inkwell color splashColor: orangeC, // inkwell color
child: const Padding( child: const Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 20, vertical: 16), horizontal: 20, vertical: 16),
child: Image( child: Image(
image: AssetImage( image:
'assets/blockchain.png'), AssetImage('assets/blockchain.png'),
height: 70)), height: 70)),
onTap: () { onTap: () {
// Navigator.push( // Navigator.push(
...@@ -265,8 +263,7 @@ class HomeScreen extends StatelessWidget { ...@@ -265,8 +263,7 @@ class HomeScreen extends StatelessWidget {
const Text( const Text(
"Explorer\n", "Explorer\n",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(color: Colors.black, fontSize: 16),
color: Colors.black, fontSize: 16),
) )
]), ]),
const SizedBox(width: 140), const SizedBox(width: 140),
...@@ -275,21 +272,18 @@ class HomeScreen extends StatelessWidget { ...@@ -275,21 +272,18 @@ class HomeScreen extends StatelessWidget {
child: ClipOval( child: ClipOval(
key: const Key('manageWallets'), key: const Key('manageWallets'),
child: Material( child: Material(
color: const Color( color: const Color(0xffFFD58D), // button color
0xffFFD58D), // button color
child: InkWell( child: InkWell(
splashColor: orangeC, // inkwell color splashColor: orangeC, // inkwell color
child: const Padding( child: const Padding(
padding: EdgeInsets.all(23), padding: EdgeInsets.all(23),
child: Image( child: Image(
image: AssetImage( image: AssetImage('assets/lock.png'),
'assets/lock.png'),
height: 57)), height: 57)),
onTap: () { onTap: () {
isWalletsExists isWalletsExists
? Navigator.push(context, ? Navigator.push(context,
MaterialPageRoute( MaterialPageRoute(builder: (context) {
builder: (context) {
return UnlockingWallet( return UnlockingWallet(
wallet: defaultWallet, wallet: defaultWallet,
action: "mywallets", action: "mywallets",
...@@ -299,8 +293,7 @@ class HomeScreen extends StatelessWidget { ...@@ -299,8 +293,7 @@ class HomeScreen extends StatelessWidget {
// Navigator.pushNamed( // Navigator.pushNamed(
// context, '/mywallets') // context, '/mywallets')
: Navigator.push(context, : Navigator.push(context,
MaterialPageRoute( MaterialPageRoute(builder: (context) {
builder: (context) {
return const NoKeyChainScreen(); return const NoKeyChainScreen();
})); }));
}), }),
...@@ -322,11 +315,11 @@ class HomeScreen extends StatelessWidget { ...@@ -322,11 +315,11 @@ class HomeScreen extends StatelessWidget {
const Text( const Text(
"Gérer mes\nportefeuilles", "Gérer mes\nportefeuilles",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(color: Colors.black, fontSize: 16),
color: Colors.black, fontSize: 16),
) )
]) ])
])) ]),
)
]), ]),
// bottomNavigationBar: BottomNavigationBar( // bottomNavigationBar: BottomNavigationBar(
// backgroundColor: Color(0xffFFD58D), // backgroundColor: Color(0xffFFD58D),
...@@ -349,7 +342,9 @@ class HomeScreen extends StatelessWidget { ...@@ -349,7 +342,9 @@ class HomeScreen extends StatelessWidget {
// ), // ),
// ], // ],
// ), // ),
))); ),
),
);
} }
} }
......
...@@ -52,14 +52,13 @@ class UnlockingWallet extends StatelessWidget { ...@@ -52,14 +52,13 @@ class UnlockingWallet extends StatelessWidget {
// backgroundColor: Colors.brown[600], // backgroundColor: Colors.brown[600],
body: SafeArea( body: SafeArea(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
const SizedBox(height: 20),
Expanded( Expanded(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
const SizedBox(height: 50), SizedBox(height: isTall ? 80 : 20),
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Image.asset( Image.asset(
'assets/chests/${currentChest.imageName}', 'assets/chests/${currentChest.imageName}',
height: 150, height: 120 * ratio,
), ),
const SizedBox(width: 5), const SizedBox(width: 5),
SizedBox( SizedBox(
...@@ -73,7 +72,7 @@ class UnlockingWallet extends StatelessWidget { ...@@ -73,7 +72,7 @@ class UnlockingWallet extends StatelessWidget {
fontWeight: FontWeight.w700), fontWeight: FontWeight.w700),
)), )),
]), ]),
const SizedBox(height: 50), SizedBox(height: 30 * ratio),
const SizedBox( const SizedBox(
width: 400, width: 400,
child: Text( child: Text(
...@@ -83,9 +82,9 @@ class UnlockingWallet extends StatelessWidget { ...@@ -83,9 +82,9 @@ class UnlockingWallet extends StatelessWidget {
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w400), fontWeight: FontWeight.w400),
)), )),
const SizedBox(height: 50), SizedBox(height: 40 * ratio),
pinForm(context, _pinLenght), pinForm(context, _pinLenght),
const SizedBox(height: 5), SizedBox(height: 3 * ratio),
InkWell( InkWell(
key: const Key('chooseChest'), key: const Key('chooseChest'),
onTap: () { onTap: () {
...@@ -127,7 +126,7 @@ class UnlockingWallet extends StatelessWidget { ...@@ -127,7 +126,7 @@ class UnlockingWallet extends StatelessWidget {
return Form( return Form(
key: formKey, key: formKey,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 30), padding: EdgeInsets.symmetric(vertical: 5 * ratio, horizontal: 30),
child: PinCodeTextField( child: PinCodeTextField(
autoFocus: true, autoFocus: true,
appContext: context, appContext: context,
...@@ -151,7 +150,7 @@ class UnlockingWallet extends StatelessWidget { ...@@ -151,7 +150,7 @@ class UnlockingWallet extends StatelessWidget {
borderWidth: 4, borderWidth: 4,
shape: PinCodeFieldShape.box, shape: PinCodeFieldShape.box,
borderRadius: BorderRadius.circular(5), borderRadius: BorderRadius.circular(5),
fieldHeight: 60, fieldHeight: 50 * ratio,
fieldWidth: 50, fieldWidth: 50,
activeFillColor: hasError ? Colors.blueAccent : Colors.black, activeFillColor: hasError ? Colors.blueAccent : Colors.black,
), ),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment