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

Gecko is working on web

parent 323d1ebe
No related branches found
No related tags found
No related merge requests found
Pipeline #14380 failed
......@@ -49,7 +49,7 @@ const bool enableSentry = true;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
setWindowTitle('Ğecko');
setWindowMinSize(const Size(600, 800));
setWindowMaxSize(const Size(800, 1000));
......
......@@ -7,8 +7,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'dart:async';
import 'package:gecko/globals.dart';
import 'package:gecko/screens/old_history_pay.dart';
import 'package:gecko/screens/myWallets/wallets_home.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:package_info/package_info.dart';
import 'package:flutter/foundation.dart' show kIsWeb;
......@@ -23,7 +21,6 @@ class HomeProvider with ChangeNotifier {
Widget appBarExplorer =
Text('Explorateur', style: TextStyle(color: Colors.grey[850]));
List currentTab = [OldHistoryScreen(), const WalletsHome()];
bool isFirstBuild = true;
// AudioCache player = AudioCache(prefix: 'sounds/');
......@@ -37,20 +34,24 @@ class HomeProvider with ChangeNotifier {
Future<void> initHive() async {
Directory hivePath;
if (Platform.isLinux || Platform.isMacOS) {
final home = Platform.environment['HOME'];
hivePath = Directory('$home/.gecko/db');
} else if (Platform.isWindows) {
final home = Platform.environment['UserProfile'];
hivePath = Directory('$home/.gecko/db');
} else if (Platform.isAndroid || Platform.isIOS || kIsWeb) {
final home = await pp.getApplicationDocumentsDirectory();
hivePath = Directory('${home.path}/db');
}
if (!await hivePath.exists()) {
await hivePath.create(recursive: true);
if (!kIsWeb) {
if (Platform.isLinux || Platform.isMacOS) {
final home = Platform.environment['HOME'];
hivePath = Directory('$home/.gecko/db');
} else if (Platform.isWindows) {
final home = Platform.environment['UserProfile'];
hivePath = Directory('$home/.gecko/db');
} else if (Platform.isAndroid || Platform.isIOS) {
final home = await pp.getApplicationDocumentsDirectory();
hivePath = Directory('${home.path}/db');
}
if (!await hivePath.exists()) {
await hivePath.create(recursive: true);
}
await Hive.initFlutter(hivePath.path);
} else {
await Hive.initFlutter();
}
await Hive.initFlutter(hivePath.path);
}
Future<String> getAppVersion() async {
......
......@@ -126,7 +126,6 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
scrollController.position.maxScrollExtent * 0.7 &&
_historyProvider.pageInfo['hasPreviousPage'] &&
result.isNotLoading) {
log.d('FETCHMORE !!');
fetchMore(opts);
}
return true;
......
......@@ -197,10 +197,12 @@ class CesiumWalletOptions extends StatelessWidget {
return Row(children: <Widget>[
ImageFiltered(
imageFilter: ImageFilter.blur(
sigmaX:
_walletOptions.isBalanceBlur ? 6 : 0,
sigmaY:
_walletOptions.isBalanceBlur ? 5 : 0),
sigmaX: _walletOptions.isBalanceBlur
? 6
: 0.001,
sigmaY: _walletOptions.isBalanceBlur
? 5
: 0.001),
child: Text(wBalanceUD,
style: TextStyle(
fontSize: isTall ? 20 : 18,
......
......@@ -213,9 +213,9 @@ class WalletOptions extends StatelessWidget {
ImageFiltered(
imageFilter: ImageFilter.blur(
sigmaX:
walletProvider.isBalanceBlur ? 6 : 0,
walletProvider.isBalanceBlur ? 6 : 0.001,
sigmaY:
walletProvider.isBalanceBlur ? 5 : 0),
walletProvider.isBalanceBlur ? 5 : 0.001),
child: Text(
wBalanceUD,
style: TextStyle(
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment