Improve responsive

This commit is contained in:
poka 2021-11-15 18:05:08 +01:00
parent 1b7c01bfe1
commit 6d69d039d1
2 changed files with 306 additions and 312 deletions

View File

@ -154,10 +154,10 @@ class HomeScreen extends StatelessWidget {
children: const <Widget>[
SizedBox(width: 7),
Image(
image:
AssetImage('assets/icon/gecko_final.png'),
image: AssetImage('assets/icon/gecko_final.png'),
height: 180),
])),
]),
),
Padding(
padding: const EdgeInsets.only(top: 15),
child: Row(
@ -171,9 +171,10 @@ class HomeScreen extends StatelessWidget {
fontSize: 17,
fontStyle: FontStyle.italic),
)
])),
]),
),
Padding(
padding: const EdgeInsets.only(top: 60),
padding: EdgeInsets.only(top: isTall ? 70 : 60),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
@ -181,8 +182,7 @@ class HomeScreen extends StatelessWidget {
Container(
child: ClipOval(
child: Material(
color: const Color(
0xffFFD58D), // button color
color: const Color(0xffFFD58D), // button color
child: InkWell(
splashColor: orangeC, // inkwell color
child: const Padding(
@ -192,8 +192,7 @@ class HomeScreen extends StatelessWidget {
'assets/qrcode-scan.png'),
height: 60)),
onTap: () async {
await _historyProvider
.scan(context);
await _historyProvider.scan(context);
}),
),
),
@ -213,11 +212,11 @@ class HomeScreen extends StatelessWidget {
const Text(
"Payer par QR-Code",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontSize: 16),
style: TextStyle(color: Colors.black, fontSize: 16),
)
])
])),
]),
),
Padding(
padding: const EdgeInsets.only(top: 50),
child: Row(
@ -227,16 +226,15 @@ class HomeScreen extends StatelessWidget {
Container(
child: ClipOval(
child: Material(
color: const Color(
0xffFFD58D), // button color
color: const Color(0xffFFD58D), // button color
child: InkWell(
splashColor: orangeC, // inkwell color
child: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 20, vertical: 16),
child: Image(
image: AssetImage(
'assets/blockchain.png'),
image:
AssetImage('assets/blockchain.png'),
height: 70)),
onTap: () {
// Navigator.push(
@ -265,8 +263,7 @@ class HomeScreen extends StatelessWidget {
const Text(
"Explorer\n",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontSize: 16),
style: TextStyle(color: Colors.black, fontSize: 16),
)
]),
const SizedBox(width: 140),
@ -275,21 +272,18 @@ class HomeScreen extends StatelessWidget {
child: ClipOval(
key: const Key('manageWallets'),
child: Material(
color: const Color(
0xffFFD58D), // button color
color: const Color(0xffFFD58D), // button color
child: InkWell(
splashColor: orangeC, // inkwell color
child: const Padding(
padding: EdgeInsets.all(23),
child: Image(
image: AssetImage(
'assets/lock.png'),
image: AssetImage('assets/lock.png'),
height: 57)),
onTap: () {
isWalletsExists
? Navigator.push(context,
MaterialPageRoute(
builder: (context) {
MaterialPageRoute(builder: (context) {
return UnlockingWallet(
wallet: defaultWallet,
action: "mywallets",
@ -299,8 +293,7 @@ class HomeScreen extends StatelessWidget {
// Navigator.pushNamed(
// context, '/mywallets')
: Navigator.push(context,
MaterialPageRoute(
builder: (context) {
MaterialPageRoute(builder: (context) {
return const NoKeyChainScreen();
}));
}),
@ -322,11 +315,11 @@ class HomeScreen extends StatelessWidget {
const Text(
"Gérer mes\nportefeuilles",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontSize: 16),
style: TextStyle(color: Colors.black, fontSize: 16),
)
])
]))
]),
)
]),
// bottomNavigationBar: BottomNavigationBar(
// backgroundColor: Color(0xffFFD58D),
@ -349,7 +342,9 @@ class HomeScreen extends StatelessWidget {
// ),
// ],
// ),
)));
),
),
);
}
}

View File

@ -52,14 +52,13 @@ class UnlockingWallet extends StatelessWidget {
// backgroundColor: Colors.brown[600],
body: SafeArea(
child: Column(children: <Widget>[
const SizedBox(height: 20),
Expanded(
child: Column(children: <Widget>[
const SizedBox(height: 50),
SizedBox(height: isTall ? 80 : 20),
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Image.asset(
'assets/chests/${currentChest.imageName}',
height: 150,
height: 120 * ratio,
),
const SizedBox(width: 5),
SizedBox(
@ -73,7 +72,7 @@ class UnlockingWallet extends StatelessWidget {
fontWeight: FontWeight.w700),
)),
]),
const SizedBox(height: 50),
SizedBox(height: 30 * ratio),
const SizedBox(
width: 400,
child: Text(
@ -83,9 +82,9 @@ class UnlockingWallet extends StatelessWidget {
color: Colors.black,
fontWeight: FontWeight.w400),
)),
const SizedBox(height: 50),
SizedBox(height: 40 * ratio),
pinForm(context, _pinLenght),
const SizedBox(height: 5),
SizedBox(height: 3 * ratio),
InkWell(
key: const Key('chooseChest'),
onTap: () {
@ -127,7 +126,7 @@ class UnlockingWallet extends StatelessWidget {
return Form(
key: formKey,
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 30),
padding: EdgeInsets.symmetric(vertical: 5 * ratio, horizontal: 30),
child: PinCodeTextField(
autoFocus: true,
appContext: context,
@ -151,7 +150,7 @@ class UnlockingWallet extends StatelessWidget {
borderWidth: 4,
shape: PinCodeFieldShape.box,
borderRadius: BorderRadius.circular(5),
fieldHeight: 60,
fieldHeight: 50 * ratio,
fieldWidth: 50,
activeFillColor: hasError ? Colors.blueAccent : Colors.black,
),