feat: adapt texts size in screen titles
This commit is contained in:
parent
ce68216684
commit
20590a944c
|
@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/chest_data.dart';
|
||||
import 'package:gecko/models/migrate_wallet_checks.dart';
|
||||
import 'package:gecko/models/scale_functions.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
import 'package:gecko/providers/duniter_indexer.dart';
|
||||
import 'package:gecko/providers/home.dart';
|
||||
|
@ -1267,7 +1268,7 @@ void snackNode(bool isConnected) {
|
|||
final snackBar = SnackBar(
|
||||
backgroundColor: Colors.grey[900],
|
||||
padding: const EdgeInsets.all(20),
|
||||
content: Text(message, style: const TextStyle(fontSize: 16)),
|
||||
content: Text(message, style: scaledTextStyle(fontSize: 14)),
|
||||
duration: const Duration(seconds: 4));
|
||||
ScaffoldMessenger.of(homeContext).showSnackBar(snackBar);
|
||||
}
|
||||
|
|
|
@ -189,12 +189,11 @@ class V2sDatapodProvider with ChangeNotifier {
|
|||
return await file.writeAsBytes(base64.decode(data));
|
||||
}
|
||||
|
||||
Image getAvatarLocal(String address, double size) {
|
||||
Image getAvatarLocal(String address) {
|
||||
final avatarFile = File('${avatarsCacheDirectory.path}/$address');
|
||||
return Image.file(
|
||||
avatarFile,
|
||||
height: size,
|
||||
fit: BoxFit.fitWidth,
|
||||
fit: BoxFit.cover,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -207,13 +206,12 @@ class V2sDatapodProvider with ChangeNotifier {
|
|||
}
|
||||
}
|
||||
|
||||
Future deleteAvatarsDirectory() async {
|
||||
Future deleteAvatarsDirectory() async {
|
||||
if (await avatarsDirectory.exists()) {
|
||||
await avatarsDirectory.delete(recursive: true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
reload() {
|
||||
notifyListeners();
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ bool isAddress(address) {
|
|||
}
|
||||
|
||||
snackMessage(context,
|
||||
{required String message, int duration = 2, double fontSize = 16}) {
|
||||
{required String message, int duration = 2, double fontSize = 14}) {
|
||||
final snackBar = SnackBar(
|
||||
backgroundColor: Colors.grey[900],
|
||||
padding: EdgeInsets.all(scaleSize(19)),
|
||||
|
@ -124,7 +124,7 @@ snackCopyKey(context) {
|
|||
backgroundColor: Colors.grey[900],
|
||||
padding: EdgeInsets.all(scaleSize(19)),
|
||||
content: Text("thisAddressHasBeenCopiedToClipboard".tr(),
|
||||
style: scaledTextStyle(fontSize: 16)),
|
||||
style: scaledTextStyle(fontSize: 14)),
|
||||
duration: const Duration(seconds: 2));
|
||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ snackCopySeed(context) {
|
|||
backgroundColor: Colors.grey[900],
|
||||
padding: EdgeInsets.all(scaleSize(19)),
|
||||
content: Text("thisMnemonicHasBeenCopiedToClipboard".tr(),
|
||||
style: scaledTextStyle(fontSize: 16)),
|
||||
style: scaledTextStyle(fontSize: 14)),
|
||||
duration: const Duration(seconds: 4));
|
||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class _ActivityScreenState extends State<ActivityScreen> {
|
|||
toolbarHeight: scaleSize(57),
|
||||
title: Text(
|
||||
'accountActivity'.tr(),
|
||||
style: scaledTextStyle(fontSize: 20),
|
||||
style: scaledTextStyle(fontSize: 18),
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: const GeckoBottomAppBar(),
|
||||
|
|
|
@ -35,8 +35,8 @@ class DebugScreen extends StatelessWidget {
|
|||
),
|
||||
const SizedBox(height: 20),
|
||||
SizedBox(
|
||||
height: 60,
|
||||
width: 250,
|
||||
height: 50,
|
||||
width: 210,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
foregroundColor: Colors.white,
|
||||
|
@ -47,7 +47,7 @@ class DebugScreen extends StatelessWidget {
|
|||
child: const Text(
|
||||
'Spawn a bloc',
|
||||
style: TextStyle(
|
||||
fontSize: 20, fontWeight: FontWeight.w600),
|
||||
fontSize: 17, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -4,11 +4,11 @@ import 'package:easy_localization/easy_localization.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:durt/durt.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/scale_functions.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
import 'package:gecko/providers/my_wallets.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/screens/myWallets/unlocking_wallet.dart';
|
||||
import 'package:gecko/widgets/commons/top_appbar.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ChangePinScreen extends StatefulWidget with ChangeNotifier {
|
||||
|
@ -45,11 +45,7 @@ class _ChangePinScreenState extends State<ChangePinScreen> {
|
|||
},
|
||||
child: Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
elevation: 1,
|
||||
toolbarHeight: scaleSize(57),
|
||||
title: Text(widget.walletName!),
|
||||
),
|
||||
appBar: GeckoAppBar(widget.walletName!),
|
||||
body: Center(
|
||||
child: SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
|
|
|
@ -44,7 +44,7 @@ class _WalletsHomeState extends State<WalletsHome> {
|
|||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
elevation: 1,
|
||||
backgroundColor: yellowC,
|
||||
toolbarHeight: scaleSize(57),
|
||||
title: Row(
|
||||
children: [
|
||||
|
@ -62,7 +62,6 @@ class _WalletsHomeState extends State<WalletsHome> {
|
|||
),
|
||||
],
|
||||
),
|
||||
backgroundColor: const Color(0xffFFD58D),
|
||||
),
|
||||
bottomNavigationBar:
|
||||
Consumer<MyWalletsProvider>(builder: (context, _, __) {
|
||||
|
|
|
@ -63,7 +63,7 @@ class _QrCodeFullscreenState extends State<QrCodeFullscreen> {
|
|||
}),
|
||||
title: Text(
|
||||
'QR Code de ${getShortPubkey(widget.address)}',
|
||||
style: scaledTextStyle(color: orangeC, fontSize: 20),
|
||||
style: scaledTextStyle(color: orangeC, fontSize: 18),
|
||||
)),
|
||||
body: SafeArea(
|
||||
child: SizedBox.expand(
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'package:gecko/providers/settings_provider.dart';
|
|||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/widgets/commons/loading.dart';
|
||||
import 'package:gecko/widgets/commons/top_appbar.dart';
|
||||
import 'package:polkawallet_sdk/api/types/networkParams.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
@ -21,12 +22,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: scaleSize(57),
|
||||
title: Text(
|
||||
'parameters'.tr(),
|
||||
style: scaledTextStyle(fontSize: 21),
|
||||
)),
|
||||
appBar: GeckoAppBar('parameters'.tr()),
|
||||
body: Column(children: <Widget>[
|
||||
ScaledSizedBox(height: 30),
|
||||
Text(
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/scale_functions.dart';
|
||||
import 'package:gecko/widgets/commons/top_appbar.dart';
|
||||
|
||||
class TemplateScreen extends StatelessWidget {
|
||||
const TemplateScreen({Key? key}) : super(key: key);
|
||||
|
@ -11,13 +12,12 @@ class TemplateScreen extends StatelessWidget {
|
|||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: scaleSize(57), title: const Text('Template screen')),
|
||||
body: const SafeArea(
|
||||
appBar: const GeckoAppBar('Template screen'),
|
||||
body: SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
SizedBox(height: 20),
|
||||
Text('data'),
|
||||
SizedBox(height: 20),
|
||||
ScaledSizedBox(height: 20),
|
||||
const Text('data'),
|
||||
ScaledSizedBox(height: 20),
|
||||
]),
|
||||
));
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ class DatapodAvatar extends StatelessWidget {
|
|||
if (cachedImage.existsSync()) {
|
||||
return ScaledSizedBox(
|
||||
width: size,
|
||||
height: size,
|
||||
child: ClipOval(
|
||||
child: datapod.getAvatarLocal(address, size),
|
||||
child: datapod.getAvatarLocal(address),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -75,8 +76,7 @@ class DatapodAvatar extends StatelessWidget {
|
|||
return ClipOval(
|
||||
child: Image.memory(
|
||||
base64.decode(sanitizedAvatar64),
|
||||
height: size,
|
||||
fit: BoxFit.fitWidth,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
);
|
||||
}),
|
||||
|
|
|
@ -79,30 +79,37 @@ class HeaderProfile extends StatelessWidget {
|
|||
]),
|
||||
ScaledSizedBox(height: 15),
|
||||
Balance(address: address, size: 20),
|
||||
ScaledSizedBox(height: 5),
|
||||
InkWell(
|
||||
onTap: () => sub.certsCounterCache[address] != null
|
||||
? {
|
||||
Navigator.push(
|
||||
context,
|
||||
PageNoTransit(builder: (context) {
|
||||
return CertificationsScreen(
|
||||
address: address,
|
||||
username: duniterIndexer
|
||||
.walletNameIndexer[address] ??
|
||||
'');
|
||||
}),
|
||||
),
|
||||
}
|
||||
: null,
|
||||
ScaledSizedBox(
|
||||
height: 60,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
IdentityStatus(
|
||||
address: address,
|
||||
isOwner: false,
|
||||
color: Colors.black),
|
||||
Certifications(address: address, size: 18)
|
||||
ScaledSizedBox(height: 5),
|
||||
InkWell(
|
||||
onTap: () => sub.certsCounterCache[address] != null
|
||||
? {
|
||||
Navigator.push(
|
||||
context,
|
||||
PageNoTransit(builder: (context) {
|
||||
return CertificationsScreen(
|
||||
address: address,
|
||||
username: duniterIndexer
|
||||
.walletNameIndexer[address] ??
|
||||
'');
|
||||
}),
|
||||
),
|
||||
}
|
||||
: null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
IdentityStatus(
|
||||
address: address,
|
||||
isOwner: false,
|
||||
color: Colors.black),
|
||||
Certifications(address: address, size: 18)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -4,7 +4,6 @@ import 'package:gecko/models/scale_functions.dart';
|
|||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/duniter_indexer.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/providers/v2s_datapod.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
import 'package:gecko/widgets/datapod_avatar.dart';
|
||||
import 'package:gecko/widgets/page_route_no_transition.dart';
|
||||
|
|
Loading…
Reference in New Issue