Skip to content

Commit

Permalink
many changes and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sahharYoucef committed Nov 23, 2022
1 parent daa9c3d commit a335ca5
Show file tree
Hide file tree
Showing 64 changed files with 1,209 additions and 874 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Framework: Flutter (>=3.3)

**Release:**

* Currently [`version v0.3xw.0`](https://github.com/sahharYoucef/alephium_wallet/releases/)
* Currently [`version v0.4.0`](https://github.com/sahharYoucef/alephium_wallet/releases/)

## Getting Started

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/splash"/>
</item>
</layer-list>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions android/app/src/main/res/drawable-night/launch_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/splash"/>
</item>
</layer-list>
3 changes: 3 additions & 0 deletions android/app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Expand Down
File renamed without changes
Binary file added assets/icons/splash_screen_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion assets/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"dark": "Dark",
"light": "Light",
"alephiumWallet": "Alephium Wallet",
"walletHome": "Wallet home",
"wallet": "Wallet",
Expand All @@ -8,10 +10,13 @@
"transactions": "Transactions",
"transaction": "Transaction",
"amountIsZero": "Amount must be greater than {}",
"balanceIsZero": "Insufficient balance",
"invalidAmount": "Please enter a valid amount!",
"amountExceeded": "Amount must be less than {}",
"gasPriceExceeded": "Gas price must be greater than {}",
"minimalGasAmount": "Amount must be greater than {}",
"invalidAddress": "Invalid Address",
"selectToken": "Select token",
"gasAmount": "Gas Amount",
"gasPrice": "Gas Price",
"confirmed": "Confirmed",
Expand Down Expand Up @@ -86,7 +91,9 @@
"amountToSend": "Amount to Send",
"broughtBy": "Brought to you by {} 2022",
"licensedUnder": "Licensed under ",
"socialLink": "This project is open source , find help on ",
"socialLink": "This project is",
"openSource": "open source,",
"findHelpOn": "find help on",
"priceSource": "Alephium Price is powered by ",
"currency": "Currency",
"network": "Network",
Expand Down
9 changes: 8 additions & 1 deletion assets/translations/es.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"dark": "Oscuro",
"light": "Ligero",
"alephiumWallet": "Alephium Cartera",
"wallet": "Cartera",
"mainAddress": "Dirección principal",
Expand All @@ -8,10 +10,13 @@
"transactions": "Transacción",
"transaction": "Transacción",
"amountIsZero": "La cantidad debe ser mayor que {}",
"balanceIsZero": "Saldo insuficiente",
"invalidAmount": "¡Por favor ingrese una cantidad válida!",
"amountExceeded": "La cantidad debe ser menor que {}",
"gasPriceExceeded": "El precio de la gasolina debe ser mayor que {}",
"minimalGasAmount": "La cantidad debe ser mayor que {}",
"invalidAddress": "Dirección no válida",
"selectToken": "Seleccionar ficha",
"gasAmount": "Cantidad de gas",
"gasPrice": "Precio de la gasolina",
"confirmed": "Confirmado",
Expand Down Expand Up @@ -86,7 +91,9 @@
"amountToSend": "Cantidad a enviar",
"broughtBy": "Presentado por {} 2022",
"licensedUnder": "Con licencia bajo ",
"socialLink": "Este proyecto es de código abierto, encuentra ayuda en ",
"socialLink": "Este proyecto es de",
"openSource": "código abierto,",
"findHelpOn": "encuentra ayuda en",
"priceSource": "El precio de Alephium funciona con ",
"currency": "Moneda",
"network": "Red",
Expand Down
11 changes: 9 additions & 2 deletions assets/translations/fr.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"dark": "Sombre",
"light": "Éclairé",
"alephiumWallet": "Alephium Portefeuille",
"wallet": "Portefeuille",
"mainAddress": "Adresse principale",
Expand All @@ -8,10 +10,13 @@
"transactions": "Transactions",
"transaction": "Transaction",
"amountIsZero": "Le montant doit être supérieur à {}",
"balanceIsZero": "Solde insuffisant",
"invalidAmount": "Veuillez saisir un montant valide!",
"amountExceeded": "Le montant doit être inférieur à {}",
"gasPriceExceeded": "Le prix du gaz doit être supérieur à {}",
"minimalGasAmount": "Le montant doit être supérieur à {}",
"invalidAddress": "Adresse invalide",
"selectToken": "Sélectionner le jeton",
"gasAmount": "Quantité de gaz",
"gasPrice": "Prix du gaz",
"confirmed": "Confirmé",
Expand Down Expand Up @@ -85,8 +90,10 @@
"expectedFees": "Frais prévus",
"amountToSend": "Montant à envoyer",
"broughtBy": "Apporté à vous d'ici {} 2022",
"licensedUnder": "Licence sous",
"socialLink": "Ce projet est open source, trouvez de l'aide sur ",
"licensedUnder": "Licence sous ",
"socialLink": "Ce projet est",
"openSource": "source ouverte,",
"findHelpOn": "trouvez de l'aide sur",
"priceSource": "Le prix d'Alephium est alimenté par ",
"currency": "Devise",
"network": "Réseau",
Expand Down
9 changes: 8 additions & 1 deletion assets/translations/it.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"dark": "Scuro",
"light": "Chiaro",
"alephiumWallet": "Portafoglio Alephium",
"wallet": "Portafoglio",
"mainAddress": "Indirizzo principale",
Expand All @@ -8,10 +10,13 @@
"transaction": "Transazione",
"walletAddresses": "Indirizzi portafoglio",
"amountIsZero": "L'importo deve essere maggiore di {}",
"balanceIsZero": "Saldo insufficiente",
"invalidAmount": "Inserisci un importo valido!",
"amountExceeded": "L'importo deve essere inferiore a {}",
"gasPriceExceeded": "Il prezzo del gas deve essere maggiore di {}",
"minimalGasAmount": "L'importo deve essere maggiore di {}",
"invalidAddress": "Indirizzo non valido",
"selectToken": "Seleziona token",
"gasAmount": "Quantità gas",
"gasPrice": "Prezzo benzina",
"confirmed": "Confermato",
Expand Down Expand Up @@ -86,7 +91,9 @@
"amountToSend": "Importo da inviare",
"broughtBy": "Portato a te entro il {} 2022",
"licensedUnder": "Licenza sotto ",
"socialLink": "Questo progetto è open source, trova aiuto su ",
"socialLink": "Questo progetto è",
"openSource": "sorgente aperta",
"findHelpOn": "trova aiuto su",
"priceSource": "Alephium Price è alimentato da ",
"currency": "Valuta",
"network": "Rete",
Expand Down
31 changes: 31 additions & 0 deletions ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,43 @@
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "darkbackground.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,48 @@
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "LaunchImageDark.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "LaunchImage@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "LaunchImageDark@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "LaunchImage@3x.png",
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "LaunchImageDark@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true />
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand All @@ -44,10 +44,10 @@
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false />
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true />
<true/>
<key>UIStatusBarHidden</key>
<true />
<true/>
</dict>
</plist>
</plist>
27 changes: 24 additions & 3 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,34 @@ import 'package:flutter_localizations/flutter_localizations.dart';
GlobalKey<ScaffoldMessengerState> scaffoldMessengerKey =
GlobalKey<ScaffoldMessengerState>();

class App extends StatelessWidget {
class App extends StatefulWidget {
final bool firstRun;
App({Key? key, this.firstRun = true})
: super(
key: key,
);

@override
State<App> createState() => _AppState();
}

class _AppState extends State<App> {
@override
void initState() {
super.initState();

var window = WidgetsBinding.instance.window;
window.onPlatformBrightnessChanged = () {
WidgetsBinding.instance.handlePlatformBrightnessChanged();
if (AppStorage.instance.themeMode == ThemeMode.system) {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
BlocProvider.of<SettingsBloc>(context)
.add(ChangeAppTheme(ThemeMode.system));
});
}
};
}

@override
Widget build(BuildContext context) {
return BlocBuilder<SettingsBloc, SettingsState>(
Expand All @@ -45,7 +66,7 @@ class App extends StatelessWidget {
WalletTheme.themeMode = AppStorage.instance.themeMode;
WalletTheme.instance = WalletTheme();
SystemChrome.setSystemUIOverlayStyle(
AppStorage.instance.themeMode == ThemeMode.dark
WalletTheme.themeMode == ThemeMode.dark
? SystemUiOverlayStyle.light
: SystemUiOverlayStyle.dark.copyWith(
statusBarColor: Colors.transparent,
Expand All @@ -65,7 +86,7 @@ class App extends StatelessWidget {
darkTheme: WalletTheme.instance.themeData,
themeMode: WalletTheme.themeMode,
debugShowCheckedModeBanner: false,
initialRoute: firstRun ? Routes.createWallet : Routes.home,
initialRoute: widget.firstRun ? Routes.createWallet : Routes.home,
onGenerateRoute: (settings) {
if (settings.name == Routes.walletMnemonic) {
Map<String, dynamic> arguments =
Expand Down
11 changes: 1 addition & 10 deletions lib/bloc/settings/settings_event.dart
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
part of 'settings_bloc.dart';

abstract class SettingsEvent extends Equatable {
abstract class SettingsEvent {
const SettingsEvent();

@override
List<Object> get props => [];
}

class ChangeAppTheme extends SettingsEvent {
final ThemeMode themeMode;

ChangeAppTheme(this.themeMode);

@override
List<Object> get props => [themeMode];
}

class LocalAuthToSend extends SettingsEvent {
final bool value;

LocalAuthToSend(this.value);

@override
List<Object> get props => [value];
}
Loading

0 comments on commit a335ca5

Please sign in to comment.