cleaning code

This commit is contained in:
poka 2022-05-28 06:12:39 +02:00
parent 5aab5bb385
commit df84eb7a48
5 changed files with 25 additions and 143 deletions

View File

@ -211,88 +211,6 @@ class HomeProvider with ChangeNotifier {
);
}
// BottomAppBar bottomAppBar(BuildContext context, int index) {
// MyWalletsProvider _myWalletProvider =
// Provider.of<MyWalletsProvider>(context, listen: false);
// return BottomAppBar(
// color: yellowC,
// notchMargin: 0, //not
// child: SizedBox(
// height: 70,
// child: Row(
// children: [
// const Spacer(flex: 1),
// IconButton(
// iconSize: 50,
// icon: const Image(image: AssetImage('assets/loupe-noire.png')),
// onPressed: () {
// Navigator.popUntil(
// context,
// ModalRoute.withName('/'),
// );
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) {
// return const SearchScreen();
// }),
// );
// },
// ),
// const Spacer(flex: 4),
// IconButton(
// iconSize: 60,
// icon: const Image(image: AssetImage('assets/wallet.png')),
// onPressed: () {
// WalletData? defaultWallet =
// _myWalletProvider.getDefaultWallet();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) {
// return UnlockingWallet(
// wallet: defaultWallet,
// action: "mywallets",
// );
// },
// ),
// );
// },
// ),
// const Spacer(flex: 1),
// ],
// )),
// );
// }
// Widget floatingAction(BuildContext context, index) {
// WalletsProfilesProvider _historyProvider =
// Provider.of<WalletsProfilesProvider>(context, listen: false);
// return SizedBox(
// height: 90,
// width: 90,
// child: FittedBox(
// child: FloatingActionButton(
// // shape: const RoundedRectangleBorder(
// // borderRadius: BorderRadius.all(Radius.elliptical(150, 100)),
// // ),
// backgroundColor: yellowC,
// elevation: 0,
// onPressed: () async {
// Navigator.popUntil(
// context,
// ModalRoute.withName('/'),
// );
// await _historyProvider.scan(context);
// },
// child: const Image(
// image: AssetImage('assets/qrcode-scan.png'),
// height: 35), //icon inside button
// ),
// ),
// );
// }
void handleSearchEnd() {
searchIcon = Icon(
Icons.search,

View File

@ -192,59 +192,23 @@ class FaderTransition extends PageRouteBuilder {
);
}
class SlideLeftRoute extends PageRouteBuilder {
final Widget? page;
SlideLeftRoute({this.page})
: super(
pageBuilder: (
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
) =>
page!,
transitionsBuilder: (
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child,
) =>
SlideTransition(
position: Tween<Offset>(
begin: const Offset(1, 0),
end: Offset.zero,
).animate(animation),
child: child,
),
);
}
class GeckoSpeechAppBar extends StatelessWidget with PreferredSizeWidget {
@override
final Size preferredSize;
final String title;
GeckoSpeechAppBar(
this.title, {
Key? key,
}) : preferredSize = const Size.fromHeight(105.4),
super(key: key);
@override
Widget build(BuildContext context) {
return AppBar(
toolbarHeight: 60 * ratio,
leading: IconButton(
icon: SizedBox(
height: 30,
child: Image.asset('assets/onBoarding/gecko_bar.png')),
onPressed: () => Navigator.popUntil(
context,
ModalRoute.withName('/'),
),
),
title: SizedBox(
height: 25,
child: Text(title),
));
}
}
// Widget geckoAppBar() {
// return AppBar(
// toolbarHeight: 60 * ratio,
// elevation: 0,
// leading: IconButton(
// icon: const Icon(Icons.arrow_back, color: Colors.black),
// onPressed: () {
// _walletOptions.isEditing = false;
// _walletOptions.isBalanceBlur = false;
// Navigator.pop(context);
// }),
// title: SizedBox(
// height: 22,
// child: Consumer<WalletOptionsProvider>(
// builder: (context, walletProvider, _) {
// return Text(_walletOptions.nameController.text);
// }),
// ),
// );
// }

View File

@ -30,7 +30,9 @@ class OnboardingStepThree extends StatelessWidget {
child: common.infoIntro(
context,
<TextSpan>[
const TextSpan(text: 'Dans une blockchain, pas de procédure de récupération par mail. Seule votre phrase de restauration peut vous permettre de récupérer vos Ğ1 à tout moment.'),
const TextSpan(
text:
'Dans une blockchain, pas de procédure de récupération par mail. Seule votre phrase de restauration peut vous permettre de récupérer vos Ğ1 à tout moment.'),
],
'mot-de-passe-oublie.png',
'>',

View File

@ -1,5 +1,4 @@
// ignore_for_file: file_names
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:flutter/material.dart';
import 'package:gecko/globals.dart';

View File

@ -28,6 +28,7 @@ class SearchResultScreen extends StatelessWidget {
return Scaffold(
appBar: AppBar(
elevation: 1,
toolbarHeight: 60 * ratio,
title: const SizedBox(
height: 22,
@ -126,9 +127,7 @@ class SearchResultScreen extends StatelessWidget {
}
}),
title: Row(children: <Widget>[
Text(
getShortPubkey(g1Wallet.pubkey!),
Text(getShortPubkey(g1Wallet.pubkey!),
style: const TextStyle(
fontSize: 18,
fontFamily: 'Monospace',