mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
use relative path for theme assets
This commit is contained in:
parent
fe8ad00b9b
commit
87ed25bd5b
37 changed files with 576 additions and 603 deletions
|
@ -167,6 +167,8 @@ void main() async {
|
||||||
await Hive.openBox<dynamic>(DB.boxNamePrefs);
|
await Hive.openBox<dynamic>(DB.boxNamePrefs);
|
||||||
await Prefs.instance.init();
|
await Prefs.instance.init();
|
||||||
|
|
||||||
|
await StackFileSystem.initThemesDir();
|
||||||
|
|
||||||
// Desktop migrate handled elsewhere (currently desktop_login_view.dart)
|
// Desktop migrate handled elsewhere (currently desktop_login_view.dart)
|
||||||
if (!Util.isDesktop) {
|
if (!Util.isDesktop) {
|
||||||
int dbVersion = DB.instance.get<dynamic>(
|
int dbVersion = DB.instance.get<dynamic>(
|
||||||
|
@ -312,7 +314,7 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
|
||||||
}
|
}
|
||||||
|
|
||||||
ref.read(applicationThemesDirectoryPathProvider.notifier).state =
|
ref.read(applicationThemesDirectoryPathProvider.notifier).state =
|
||||||
(await StackFileSystem.applicationThemesDirectory()).path;
|
StackFileSystem.themesDir!.path;
|
||||||
|
|
||||||
_notificationsService = ref.read(notificationsProvider);
|
_notificationsService = ref.read(notificationsProvider);
|
||||||
_nodeService = ref.read(nodeServiceChangeNotifierProvider);
|
_nodeService = ref.read(nodeServiceChangeNotifierProvider);
|
||||||
|
@ -407,7 +409,7 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||||
//Add themes path to provider
|
//Add themes path to provider
|
||||||
ref.read(applicationThemesDirectoryPathProvider.notifier).state =
|
ref.read(applicationThemesDirectoryPathProvider.notifier).state =
|
||||||
(await StackFileSystem.applicationThemesDirectory()).path;
|
StackFileSystem.themesDir!.path;
|
||||||
|
|
||||||
ref.read(themeProvider.state).state = ref.read(pThemeService).getTheme(
|
ref.read(themeProvider.state).state = ref.read(pThemeService).getTheme(
|
||||||
themeId: themeId,
|
themeId: themeId,
|
||||||
|
|
|
@ -17,6 +17,7 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
import 'package:stackwallet/utilities/extensions/impl/box_shadow.dart';
|
import 'package:stackwallet/utilities/extensions/impl/box_shadow.dart';
|
||||||
import 'package:stackwallet/utilities/extensions/impl/gradient.dart';
|
import 'package:stackwallet/utilities/extensions/impl/gradient.dart';
|
||||||
import 'package:stackwallet/utilities/extensions/impl/string.dart';
|
import 'package:stackwallet/utilities/extensions/impl/string.dart';
|
||||||
|
import 'package:stackwallet/utilities/stack_file_system.dart';
|
||||||
|
|
||||||
part 'stack_theme.g.dart';
|
part 'stack_theme.g.dart';
|
||||||
|
|
||||||
|
@ -1508,7 +1509,6 @@ class StackTheme {
|
||||||
|
|
||||||
factory StackTheme.fromJson({
|
factory StackTheme.fromJson({
|
||||||
required Map<String, dynamic> json,
|
required Map<String, dynamic> json,
|
||||||
required String applicationThemesDirectoryPath,
|
|
||||||
}) {
|
}) {
|
||||||
final version = json["version"] as int? ?? 1;
|
final version = json["version"] as int? ?? 1;
|
||||||
|
|
||||||
|
@ -1517,21 +1517,18 @@ class StackTheme {
|
||||||
..assetsV1 = version == 1
|
..assetsV1 = version == 1
|
||||||
? ThemeAssets.fromJson(
|
? ThemeAssets.fromJson(
|
||||||
json: Map<String, dynamic>.from(json["assets"] as Map),
|
json: Map<String, dynamic>.from(json["assets"] as Map),
|
||||||
applicationThemesDirectoryPath: applicationThemesDirectoryPath,
|
|
||||||
themeId: json["id"] as String,
|
themeId: json["id"] as String,
|
||||||
)
|
)
|
||||||
: null
|
: null
|
||||||
..assetsV2 = version == 2
|
..assetsV2 = version == 2
|
||||||
? ThemeAssetsV2.fromJson(
|
? ThemeAssetsV2.fromJson(
|
||||||
json: Map<String, dynamic>.from(json["assets"] as Map),
|
json: Map<String, dynamic>.from(json["assets"] as Map),
|
||||||
applicationThemesDirectoryPath: applicationThemesDirectoryPath,
|
|
||||||
themeId: json["id"] as String,
|
themeId: json["id"] as String,
|
||||||
)
|
)
|
||||||
: null
|
: null
|
||||||
..assetsV3 = version >= 3
|
..assetsV3 = version >= 3
|
||||||
? ThemeAssetsV3.fromJson(
|
? ThemeAssetsV3.fromJson(
|
||||||
json: Map<String, dynamic>.from(json["assets"] as Map),
|
json: Map<String, dynamic>.from(json["assets"] as Map),
|
||||||
applicationThemesDirectoryPath: applicationThemesDirectoryPath,
|
|
||||||
themeId: json["id"] as String,
|
themeId: json["id"] as String,
|
||||||
)
|
)
|
||||||
: null
|
: null
|
||||||
|
@ -1954,117 +1951,81 @@ class ThemeAssets implements IThemeAssets {
|
||||||
|
|
||||||
factory ThemeAssets.fromJson({
|
factory ThemeAssets.fromJson({
|
||||||
required Map<String, dynamic> json,
|
required Map<String, dynamic> json,
|
||||||
required String applicationThemesDirectoryPath,
|
|
||||||
required String themeId,
|
required String themeId,
|
||||||
}) {
|
}) {
|
||||||
return ThemeAssets()
|
return ThemeAssets()
|
||||||
..bellNew =
|
..bellNew = "$themeId/assets/${json["bell_new"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["bell_new"] as String}"
|
..buy = "$themeId/assets/${json["buy"] as String}"
|
||||||
..buy =
|
..exchange = "$themeId/assets/${json["exchange"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["buy"] as String}"
|
|
||||||
..exchange =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["exchange"] as String}"
|
|
||||||
..personaIncognito =
|
..personaIncognito =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["persona_incognito"] as String}"
|
"$themeId/assets/${json["persona_incognito"] as String}"
|
||||||
..personaEasy =
|
..personaEasy = "$themeId/assets/${json["persona_easy"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["persona_easy"] as String}"
|
..stack = "$themeId/assets/${json["stack"] as String}"
|
||||||
..stack =
|
..stackIcon = "$themeId/assets/${json["stack_icon"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["stack"] as String}"
|
..receive = "$themeId/assets/${json["receive"] as String}"
|
||||||
..stackIcon =
|
..receivePending = "$themeId/assets/${json["receive_pending"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["stack_icon"] as String}"
|
|
||||||
..receive =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["receive"] as String}"
|
|
||||||
..receivePending =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["receive_pending"] as String}"
|
|
||||||
..receiveCancelled =
|
..receiveCancelled =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["receive_cancelled"] as String}"
|
"$themeId/assets/${json["receive_cancelled"] as String}"
|
||||||
..send =
|
..send = "$themeId/assets/${json["send"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["send"] as String}"
|
..sendPending = "$themeId/assets/${json["send_pending"] as String}"
|
||||||
..sendPending =
|
..sendCancelled = "$themeId/assets/${json["send_cancelled"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["send_pending"] as String}"
|
..themeSelector = "$themeId/assets/${json["theme_selector"] as String}"
|
||||||
..sendCancelled =
|
..themePreview = "$themeId/assets/${json["theme_preview"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["send_cancelled"] as String}"
|
..txExchange = "$themeId/assets/${json["tx_exchange"] as String}"
|
||||||
..themeSelector =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["theme_selector"] as String}"
|
|
||||||
..themePreview =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["theme_preview"] as String}"
|
|
||||||
..txExchange =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange"] as String}"
|
|
||||||
..txExchangePending =
|
..txExchangePending =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange_pending"] as String}"
|
"$themeId/assets/${json["tx_exchange_pending"] as String}"
|
||||||
..txExchangeFailed =
|
..txExchangeFailed =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange_failed"] as String}"
|
"$themeId/assets/${json["tx_exchange_failed"] as String}"
|
||||||
..bitcoin =
|
..bitcoin = "$themeId/assets/${json["bitcoin"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["bitcoin"] as String}"
|
..litecoin = "$themeId/assets/${json["litecoin"] as String}"
|
||||||
..litecoin =
|
..bitcoincash = "$themeId/assets/${json["bitcoincash"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["litecoin"] as String}"
|
..dogecoin = "$themeId/assets/${json["dogecoin"] as String}"
|
||||||
..bitcoincash =
|
..epicCash = "$themeId/assets/${json["epicCash"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["bitcoincash"] as String}"
|
..ethereum = "$themeId/assets/${json["ethereum"] as String}"
|
||||||
..dogecoin =
|
..firo = "$themeId/assets/${json["firo"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["dogecoin"] as String}"
|
..monero = "$themeId/assets/${json["monero"] as String}"
|
||||||
..epicCash =
|
..wownero = "$themeId/assets/${json["wownero"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["epicCash"] as String}"
|
..namecoin = "$themeId/assets/${json["namecoin"] as String}"
|
||||||
..ethereum =
|
..particl = "$themeId/assets/${json["particl"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["ethereum"] as String}"
|
..bitcoinImage = "$themeId/assets/${json["bitcoin_image"] as String}"
|
||||||
..firo =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["firo"] as String}"
|
|
||||||
..monero =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["monero"] as String}"
|
|
||||||
..wownero =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["wownero"] as String}"
|
|
||||||
..namecoin =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["namecoin"] as String}"
|
|
||||||
..particl =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["particl"] as String}"
|
|
||||||
..bitcoinImage =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["bitcoin_image"] as String}"
|
|
||||||
..bitcoincashImage =
|
..bitcoincashImage =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["bitcoincash_image"] as String}"
|
"$themeId/assets/${json["bitcoincash_image"] as String}"
|
||||||
..dogecoinImage =
|
..dogecoinImage = "$themeId/assets/${json["dogecoin_image"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["dogecoin_image"] as String}"
|
..epicCashImage = "$themeId/assets/${json["epicCash_image"] as String}"
|
||||||
..epicCashImage =
|
..ethereumImage = "$themeId/assets/${json["ethereum_image"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["epicCash_image"] as String}"
|
..firoImage = "$themeId/assets/${json["firo_image"] as String}"
|
||||||
..ethereumImage =
|
..litecoinImage = "$themeId/assets/${json["litecoin_image"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["ethereum_image"] as String}"
|
..moneroImage = "$themeId/assets/${json["monero_image"] as String}"
|
||||||
..firoImage =
|
..wowneroImage = "$themeId/assets/${json["wownero_image"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["firo_image"] as String}"
|
..namecoinImage = "$themeId/assets/${json["namecoin_image"] as String}"
|
||||||
..litecoinImage =
|
..particlImage = "$themeId/assets/${json["particl_image"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["litecoin_image"] as String}"
|
|
||||||
..moneroImage =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["monero_image"] as String}"
|
|
||||||
..wowneroImage =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["wownero_image"] as String}"
|
|
||||||
..namecoinImage =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["namecoin_image"] as String}"
|
|
||||||
..particlImage =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["particl_image"] as String}"
|
|
||||||
..bitcoinImageSecondary =
|
..bitcoinImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["bitcoin_image_secondary"] as String}"
|
"$themeId/assets/${json["bitcoin_image_secondary"] as String}"
|
||||||
..bitcoincashImageSecondary =
|
..bitcoincashImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["bitcoincash_image_secondary"] as String}"
|
"$themeId/assets/${json["bitcoincash_image_secondary"] as String}"
|
||||||
..dogecoinImageSecondary =
|
..dogecoinImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["dogecoin_image_secondary"] as String}"
|
"$themeId/assets/${json["dogecoin_image_secondary"] as String}"
|
||||||
..epicCashImageSecondary =
|
..epicCashImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["epicCash_image_secondary"] as String}"
|
"$themeId/assets/${json["epicCash_image_secondary"] as String}"
|
||||||
..ethereumImageSecondary =
|
..ethereumImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["ethereum_image_secondary"] as String}"
|
"$themeId/assets/${json["ethereum_image_secondary"] as String}"
|
||||||
..firoImageSecondary =
|
..firoImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["firo_image_secondary"] as String}"
|
"$themeId/assets/${json["firo_image_secondary"] as String}"
|
||||||
..litecoinImageSecondary =
|
..litecoinImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["litecoin_image_secondary"] as String}"
|
"$themeId/assets/${json["litecoin_image_secondary"] as String}"
|
||||||
..moneroImageSecondary =
|
..moneroImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["monero_image_secondary"] as String}"
|
"$themeId/assets/${json["monero_image_secondary"] as String}"
|
||||||
..wowneroImageSecondary =
|
..wowneroImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["wownero_image_secondary"] as String}"
|
"$themeId/assets/${json["wownero_image_secondary"] as String}"
|
||||||
..namecoinImageSecondary =
|
..namecoinImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["namecoin_image_secondary"] as String}"
|
"$themeId/assets/${json["namecoin_image_secondary"] as String}"
|
||||||
..particlImageSecondary =
|
..particlImageSecondary =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["particl_image_secondary"] as String}"
|
"$themeId/assets/${json["particl_image_secondary"] as String}"
|
||||||
..loadingGif = json["loading_gif"] is String
|
..loadingGif = json["loading_gif"] is String
|
||||||
? "$applicationThemesDirectoryPath/$themeId/assets/${json["loading_gif"] as String}"
|
? "$themeId/assets/${json["loading_gif"] as String}"
|
||||||
: null
|
: null
|
||||||
..background = json["background"] is String
|
..background = json["background"] is String
|
||||||
? "$applicationThemesDirectoryPath/$themeId/assets/${json["background"] as String}"
|
? "$themeId/assets/${json["background"] as String}"
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2146,65 +2107,50 @@ class ThemeAssetsV2 implements IThemeAssets {
|
||||||
|
|
||||||
factory ThemeAssetsV2.fromJson({
|
factory ThemeAssetsV2.fromJson({
|
||||||
required Map<String, dynamic> json,
|
required Map<String, dynamic> json,
|
||||||
required String applicationThemesDirectoryPath,
|
|
||||||
required String themeId,
|
required String themeId,
|
||||||
}) {
|
}) {
|
||||||
return ThemeAssetsV2()
|
return ThemeAssetsV2()
|
||||||
..bellNew =
|
..bellNew = "$themeId/assets/${json["bell_new"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["bell_new"] as String}"
|
..buy = "$themeId/assets/${json["buy"] as String}"
|
||||||
..buy =
|
..exchange = "$themeId/assets/${json["exchange"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["buy"] as String}"
|
|
||||||
..exchange =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["exchange"] as String}"
|
|
||||||
..personaIncognito =
|
..personaIncognito =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["persona_incognito"] as String}"
|
"$themeId/assets/${json["persona_incognito"] as String}"
|
||||||
..personaEasy =
|
..personaEasy = "$themeId/assets/${json["persona_easy"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["persona_easy"] as String}"
|
..stack = "$themeId/assets/${json["stack"] as String}"
|
||||||
..stack =
|
..stackIcon = "$themeId/assets/${json["stack_icon"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["stack"] as String}"
|
..receive = "$themeId/assets/${json["receive"] as String}"
|
||||||
..stackIcon =
|
..receivePending = "$themeId/assets/${json["receive_pending"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["stack_icon"] as String}"
|
|
||||||
..receive =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["receive"] as String}"
|
|
||||||
..receivePending =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["receive_pending"] as String}"
|
|
||||||
..receiveCancelled =
|
..receiveCancelled =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["receive_cancelled"] as String}"
|
"$themeId/assets/${json["receive_cancelled"] as String}"
|
||||||
..send =
|
..send = "$themeId/assets/${json["send"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["send"] as String}"
|
..sendPending = "$themeId/assets/${json["send_pending"] as String}"
|
||||||
..sendPending =
|
..sendCancelled = "$themeId/assets/${json["send_cancelled"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["send_pending"] as String}"
|
..themeSelector = "$themeId/assets/${json["theme_selector"] as String}"
|
||||||
..sendCancelled =
|
..themePreview = "$themeId/assets/${json["theme_preview"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["send_cancelled"] as String}"
|
..txExchange = "$themeId/assets/${json["tx_exchange"] as String}"
|
||||||
..themeSelector =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["theme_selector"] as String}"
|
|
||||||
..themePreview =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["theme_preview"] as String}"
|
|
||||||
..txExchange =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange"] as String}"
|
|
||||||
..txExchangePending =
|
..txExchangePending =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange_pending"] as String}"
|
"$themeId/assets/${json["tx_exchange_pending"] as String}"
|
||||||
..txExchangeFailed =
|
..txExchangeFailed =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange_failed"] as String}"
|
"$themeId/assets/${json["tx_exchange_failed"] as String}"
|
||||||
..coinPlaceholder =
|
..coinPlaceholder =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["coin_placeholder"] as String}"
|
"$themeId/assets/${json["coin_placeholder"] as String}"
|
||||||
..coinIconsString = createCoinAssetsString(
|
..coinIconsString = createCoinAssetsString(
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets",
|
"$themeId/assets",
|
||||||
Map<String, dynamic>.from(json["coins"]["icons"] as Map),
|
Map<String, dynamic>.from(json["coins"]["icons"] as Map),
|
||||||
)
|
)
|
||||||
..coinImagesString = createCoinAssetsString(
|
..coinImagesString = createCoinAssetsString(
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets",
|
"$themeId/assets",
|
||||||
Map<String, dynamic>.from(json["coins"]["images"] as Map),
|
Map<String, dynamic>.from(json["coins"]["images"] as Map),
|
||||||
)
|
)
|
||||||
..coinSecondaryImagesString = createCoinAssetsString(
|
..coinSecondaryImagesString = createCoinAssetsString(
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets",
|
"$themeId/assets",
|
||||||
Map<String, dynamic>.from(json["coins"]["secondaries"] as Map),
|
Map<String, dynamic>.from(json["coins"]["secondaries"] as Map),
|
||||||
)
|
)
|
||||||
..loadingGif = json["loading_gif"] is String
|
..loadingGif = json["loading_gif"] is String
|
||||||
? "$applicationThemesDirectoryPath/$themeId/assets/${json["loading_gif"] as String}"
|
? "$themeId/assets/${json["loading_gif"] as String}"
|
||||||
: null
|
: null
|
||||||
..background = json["background"] is String
|
..background = json["background"] is String
|
||||||
? "$applicationThemesDirectoryPath/$themeId/assets/${json["background"] as String}"
|
? "$themeId/assets/${json["background"] as String}"
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2265,48 +2211,132 @@ class ThemeAssetsV2 implements IThemeAssets {
|
||||||
|
|
||||||
@Embedded(inheritance: false)
|
@Embedded(inheritance: false)
|
||||||
class ThemeAssetsV3 implements IThemeAssets {
|
class ThemeAssetsV3 implements IThemeAssets {
|
||||||
|
@Name("bellNew")
|
||||||
|
late final String bellNewRelative;
|
||||||
@override
|
@override
|
||||||
late final String bellNew;
|
@ignore
|
||||||
@override
|
String get bellNew => prependIfNeeded(bellNewRelative);
|
||||||
late final String buy;
|
|
||||||
@override
|
|
||||||
late final String exchange;
|
|
||||||
@override
|
|
||||||
late final String personaIncognito;
|
|
||||||
@override
|
|
||||||
late final String personaEasy;
|
|
||||||
@override
|
|
||||||
late final String stack;
|
|
||||||
@override
|
|
||||||
late final String stackIcon;
|
|
||||||
@override
|
|
||||||
late final String receive;
|
|
||||||
@override
|
|
||||||
late final String receivePending;
|
|
||||||
@override
|
|
||||||
late final String receiveCancelled;
|
|
||||||
@override
|
|
||||||
late final String send;
|
|
||||||
@override
|
|
||||||
late final String sendPending;
|
|
||||||
@override
|
|
||||||
late final String sendCancelled;
|
|
||||||
@override
|
|
||||||
late final String themeSelector;
|
|
||||||
@override
|
|
||||||
late final String themePreview;
|
|
||||||
@override
|
|
||||||
late final String txExchange;
|
|
||||||
@override
|
|
||||||
late final String txExchangePending;
|
|
||||||
@override
|
|
||||||
late final String txExchangeFailed;
|
|
||||||
@override
|
|
||||||
late final String? loadingGif;
|
|
||||||
@override
|
|
||||||
late final String? background;
|
|
||||||
|
|
||||||
late final String coinPlaceholder;
|
@Name("buy")
|
||||||
|
late final String buyRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get buy => prependIfNeeded(buyRelative);
|
||||||
|
|
||||||
|
@Name("exchange")
|
||||||
|
late final String exchangeRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get exchange => prependIfNeeded(exchangeRelative);
|
||||||
|
|
||||||
|
@Name("personaIncognito")
|
||||||
|
late final String personaIncognitoRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get personaIncognito => prependIfNeeded(personaIncognitoRelative);
|
||||||
|
|
||||||
|
@Name("personaEasy")
|
||||||
|
late final String personaEasyRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get personaEasy => prependIfNeeded(personaEasyRelative);
|
||||||
|
|
||||||
|
@Name("stack")
|
||||||
|
late final String stackRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get stack => prependIfNeeded(stackRelative);
|
||||||
|
|
||||||
|
@Name("stackIcon")
|
||||||
|
late final String stackIconRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get stackIcon => prependIfNeeded(stackIconRelative);
|
||||||
|
|
||||||
|
@Name("receive")
|
||||||
|
late final String receiveRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get receive => prependIfNeeded(receiveRelative);
|
||||||
|
|
||||||
|
@Name("receivePending")
|
||||||
|
late final String receivePendingRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get receivePending => prependIfNeeded(receivePendingRelative);
|
||||||
|
|
||||||
|
@Name("receiveCancelled")
|
||||||
|
late final String receiveCancelledRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get receiveCancelled => prependIfNeeded(receiveCancelledRelative);
|
||||||
|
|
||||||
|
@Name("send")
|
||||||
|
late final String sendRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get send => prependIfNeeded(sendRelative);
|
||||||
|
|
||||||
|
@Name("sendPending")
|
||||||
|
late final String sendPendingRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get sendPending => prependIfNeeded(sendPendingRelative);
|
||||||
|
|
||||||
|
@Name("sendCancelled")
|
||||||
|
late final String sendCancelledRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get sendCancelled => prependIfNeeded(sendCancelledRelative);
|
||||||
|
|
||||||
|
@Name("themeSelector")
|
||||||
|
late final String themeSelectorRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get themeSelector => prependIfNeeded(themeSelectorRelative);
|
||||||
|
|
||||||
|
@Name("themePreview")
|
||||||
|
late final String themePreviewRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get themePreview => prependIfNeeded(themePreviewRelative);
|
||||||
|
|
||||||
|
@Name("txExchange")
|
||||||
|
late final String txExchangeRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get txExchange => prependIfNeeded(txExchangeRelative);
|
||||||
|
|
||||||
|
@Name("txExchangePending")
|
||||||
|
late final String txExchangePendingRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get txExchangePending => prependIfNeeded(txExchangePendingRelative);
|
||||||
|
|
||||||
|
@Name("txExchangeFailed")
|
||||||
|
late final String txExchangeFailedRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String get txExchangeFailed => prependIfNeeded(txExchangeFailedRelative);
|
||||||
|
|
||||||
|
@Name("loadingGif")
|
||||||
|
late final String? loadingGifRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String? get loadingGif =>
|
||||||
|
loadingGifRelative != null ? prependIfNeeded(loadingGifRelative!) : null;
|
||||||
|
|
||||||
|
@Name("background")
|
||||||
|
late final String? backgroundRelative;
|
||||||
|
@override
|
||||||
|
@ignore
|
||||||
|
String? get background =>
|
||||||
|
backgroundRelative != null ? prependIfNeeded(backgroundRelative!) : null;
|
||||||
|
|
||||||
|
@Name("coinPlaceholder")
|
||||||
|
late final String coinPlaceholderRelative;
|
||||||
|
@ignore
|
||||||
|
String get coinPlaceholder => prependIfNeeded(coinPlaceholderRelative);
|
||||||
|
|
||||||
// Added some future proof params in case we want to add anything else
|
// Added some future proof params in case we want to add anything else
|
||||||
// This should provide some buffer in stead of creating assetsV4 etc
|
// This should provide some buffer in stead of creating assetsV4 etc
|
||||||
|
@ -2361,77 +2391,77 @@ class ThemeAssetsV3 implements IThemeAssets {
|
||||||
|
|
||||||
factory ThemeAssetsV3.fromJson({
|
factory ThemeAssetsV3.fromJson({
|
||||||
required Map<String, dynamic> json,
|
required Map<String, dynamic> json,
|
||||||
required String applicationThemesDirectoryPath,
|
|
||||||
required String themeId,
|
required String themeId,
|
||||||
}) {
|
}) {
|
||||||
return ThemeAssetsV3()
|
return ThemeAssetsV3()
|
||||||
..bellNew =
|
..bellNewRelative = "$themeId/assets/${json["bell_new"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["bell_new"] as String}"
|
..buyRelative = "$themeId/assets/${json["buy"] as String}"
|
||||||
..buy =
|
..exchangeRelative = "$themeId/assets/${json["exchange"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["buy"] as String}"
|
..personaIncognitoRelative =
|
||||||
..exchange =
|
"$themeId/assets/${json["persona_incognito"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["exchange"] as String}"
|
..personaEasyRelative =
|
||||||
..personaIncognito =
|
"$themeId/assets/${json["persona_easy"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["persona_incognito"] as String}"
|
..stackRelative = "$themeId/assets/${json["stack"] as String}"
|
||||||
..personaEasy =
|
..stackIconRelative = "$themeId/assets/${json["stack_icon"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["persona_easy"] as String}"
|
..receiveRelative = "$themeId/assets/${json["receive"] as String}"
|
||||||
..stack =
|
..receivePendingRelative =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["stack"] as String}"
|
"$themeId/assets/${json["receive_pending"] as String}"
|
||||||
..stackIcon =
|
..receiveCancelledRelative =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["stack_icon"] as String}"
|
"$themeId/assets/${json["receive_cancelled"] as String}"
|
||||||
..receive =
|
..sendRelative = "$themeId/assets/${json["send"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["receive"] as String}"
|
..sendPendingRelative =
|
||||||
..receivePending =
|
"$themeId/assets/${json["send_pending"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["receive_pending"] as String}"
|
..sendCancelledRelative =
|
||||||
..receiveCancelled =
|
"$themeId/assets/${json["send_cancelled"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["receive_cancelled"] as String}"
|
..themeSelectorRelative =
|
||||||
..send =
|
"$themeId/assets/${json["theme_selector"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["send"] as String}"
|
..themePreviewRelative =
|
||||||
..sendPending =
|
"$themeId/assets/${json["theme_preview"] as String}"
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["send_pending"] as String}"
|
..txExchangeRelative = "$themeId/assets/${json["tx_exchange"] as String}"
|
||||||
..sendCancelled =
|
..txExchangePendingRelative =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["send_cancelled"] as String}"
|
"$themeId/assets/${json["tx_exchange_pending"] as String}"
|
||||||
..themeSelector =
|
..txExchangeFailedRelative =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["theme_selector"] as String}"
|
"$themeId/assets/${json["tx_exchange_failed"] as String}"
|
||||||
..themePreview =
|
..coinPlaceholderRelative =
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["theme_preview"] as String}"
|
"$themeId/assets/${json["coin_placeholder"] as String}"
|
||||||
..txExchange =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange"] as String}"
|
|
||||||
..txExchangePending =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange_pending"] as String}"
|
|
||||||
..txExchangeFailed =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["tx_exchange_failed"] as String}"
|
|
||||||
..coinPlaceholder =
|
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets/${json["coin_placeholder"] as String}"
|
|
||||||
..coinIconsString = createCoinAssetsString(
|
..coinIconsString = createCoinAssetsString(
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets",
|
"$themeId/assets",
|
||||||
Map<String, dynamic>.from(json["coins"]["icons"] as Map),
|
Map<String, dynamic>.from(json["coins"]["icons"] as Map),
|
||||||
)
|
)
|
||||||
..coinImagesString = createCoinAssetsString(
|
..coinImagesString = createCoinAssetsString(
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets",
|
"$themeId/assets",
|
||||||
Map<String, dynamic>.from(json["coins"]["images"] as Map),
|
Map<String, dynamic>.from(json["coins"]["images"] as Map),
|
||||||
)
|
)
|
||||||
..coinSecondaryImagesString = createCoinAssetsString(
|
..coinSecondaryImagesString = createCoinAssetsString(
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets",
|
"$themeId/assets",
|
||||||
Map<String, dynamic>.from(json["coins"]["secondaries"] as Map),
|
Map<String, dynamic>.from(json["coins"]["secondaries"] as Map),
|
||||||
)
|
)
|
||||||
..coinCardImagesString = json["coins"]["cards"] is Map
|
..coinCardImagesString = json["coins"]["cards"] is Map
|
||||||
? createCoinAssetsString(
|
? createCoinAssetsString(
|
||||||
"$applicationThemesDirectoryPath/$themeId/assets",
|
"$themeId/assets",
|
||||||
Map<String, dynamic>.from(json["coins"]["cards"] as Map),
|
Map<String, dynamic>.from(json["coins"]["cards"] as Map),
|
||||||
)
|
)
|
||||||
: null
|
: null
|
||||||
..loadingGif = json["loading_gif"] is String
|
..loadingGifRelative = json["loading_gif"] is String
|
||||||
? "$applicationThemesDirectoryPath/$themeId/assets/${json["loading_gif"] as String}"
|
? "$themeId/assets/${json["loading_gif"] as String}"
|
||||||
: null
|
: null
|
||||||
..background = json["background"] is String
|
..backgroundRelative = json["background"] is String
|
||||||
? "$applicationThemesDirectoryPath/$themeId/assets/${json["background"] as String}"
|
? "$themeId/assets/${json["background"] as String}"
|
||||||
: null
|
: null
|
||||||
..dummy1 = null
|
..dummy1 = null
|
||||||
..dummy2 = null
|
..dummy2 = null
|
||||||
..dummy3 = null;
|
..dummy3 = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static String prependIfNeeded(String relativePath) {
|
||||||
|
final path = StackFileSystem.themesDir!.path;
|
||||||
|
if (relativePath.startsWith(path)) {
|
||||||
|
return relativePath;
|
||||||
|
} else {
|
||||||
|
return "$path/$relativePath";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static String createCoinAssetsString(String path, Map<String, dynamic> json) {
|
static String createCoinAssetsString(String path, Map<String, dynamic> json) {
|
||||||
final Map<String, dynamic> map = {};
|
final Map<String, dynamic> map = {};
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
|
@ -2451,6 +2481,8 @@ class ThemeAssetsV3 implements IThemeAssets {
|
||||||
|
|
||||||
for (final coin in Coin.values) {
|
for (final coin in Coin.values) {
|
||||||
result[coin] = map[coin.name] as String? ?? placeHolder;
|
result[coin] = map[coin.name] as String? ?? placeHolder;
|
||||||
|
|
||||||
|
result[coin] = prependIfNeeded(result[coin]!);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -126,7 +126,7 @@ class _StackThemeCardState extends ConsumerState<StackThemeCard> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> getThemeDirectorySize() async {
|
Future<String> getThemeDirectorySize() async {
|
||||||
final themesDir = await StackFileSystem.applicationThemesDirectory();
|
final themesDir = StackFileSystem.themesDir!;
|
||||||
final themeDir = Directory("${themesDir.path}/${widget.data.id}");
|
final themeDir = Directory("${themesDir.path}/${widget.data.id}");
|
||||||
int bytes = 0;
|
int bytes = 0;
|
||||||
if (await themeDir.exists()) {
|
if (await themeDir.exists()) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ class ThemeService {
|
||||||
void init(MainDB db) => _db ??= db;
|
void init(MainDB db) => _db ??= db;
|
||||||
|
|
||||||
Future<void> install({required Uint8List themeArchiveData}) async {
|
Future<void> install({required Uint8List themeArchiveData}) async {
|
||||||
final themesDir = await StackFileSystem.applicationThemesDirectory();
|
final themesDir = StackFileSystem.themesDir!;
|
||||||
|
|
||||||
final archive = ZipDecoder().decodeBytes(themeArchiveData);
|
final archive = ZipDecoder().decodeBytes(themeArchiveData);
|
||||||
|
|
||||||
|
@ -55,7 +55,6 @@ class ThemeService {
|
||||||
|
|
||||||
final theme = StackTheme.fromJson(
|
final theme = StackTheme.fromJson(
|
||||||
json: Map<String, dynamic>.from(json),
|
json: Map<String, dynamic>.from(json),
|
||||||
applicationThemesDirectoryPath: themesDir.path,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -88,7 +87,7 @@ class ThemeService {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> remove({required String themeId}) async {
|
Future<void> remove({required String themeId}) async {
|
||||||
final themesDir = await StackFileSystem.applicationThemesDirectory();
|
final themesDir = StackFileSystem.themesDir!;
|
||||||
final isarId = await db.isar.stackThemes
|
final isarId = await db.isar.stackThemes
|
||||||
.where()
|
.where()
|
||||||
.themeIdEqualTo(themeId)
|
.themeIdEqualTo(themeId)
|
||||||
|
@ -187,7 +186,7 @@ class ThemeService {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final themesDir = await StackFileSystem.applicationThemesDirectory();
|
final themesDir = StackFileSystem.themesDir!;
|
||||||
final jsonFileExists =
|
final jsonFileExists =
|
||||||
await File("${themesDir.path}/$themeId/theme.json").exists();
|
await File("${themesDir.path}/$themeId/theme.json").exists();
|
||||||
final assetsDirExists =
|
final assetsDirExists =
|
||||||
|
|
|
@ -73,16 +73,15 @@ abstract class StackFileSystem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<Directory> applicationThemesDirectory() async {
|
static Future<void> initThemesDir() async {
|
||||||
final root = await applicationRootDirectory();
|
final root = await applicationRootDirectory();
|
||||||
// if (Util.isDesktop) {
|
|
||||||
final dir = Directory("${root.path}/themes");
|
final dir = Directory("${root.path}/themes");
|
||||||
if (!dir.existsSync()) {
|
if (!dir.existsSync()) {
|
||||||
await dir.create();
|
await dir.create();
|
||||||
}
|
}
|
||||||
return dir;
|
themesDir = dir;
|
||||||
// } else {
|
|
||||||
// return root;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Directory? themesDir;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ void main() {
|
||||||
final mockThemeService = MockThemeService();
|
final mockThemeService = MockThemeService();
|
||||||
final theme = StackTheme.fromJson(
|
final theme = StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
);
|
);
|
||||||
|
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
|
|
|
@ -59,7 +59,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
when(mockPrefs.currency).thenAnswer((_) => "USD");
|
when(mockPrefs.currency).thenAnswer((_) => "USD");
|
||||||
|
@ -89,7 +88,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -143,7 +141,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -169,7 +166,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -56,8 +56,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath:
|
|
||||||
applicationThemesDirectoryPath,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -28,7 +28,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -28,7 +28,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -24,7 +24,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -56,7 +55,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -93,7 +91,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -22,7 +22,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -37,7 +36,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -22,7 +22,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -37,7 +36,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -67,7 +67,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -99,7 +98,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -151,7 +149,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -187,7 +184,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -223,7 +219,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -264,7 +259,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -301,7 +295,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -333,7 +326,7 @@ void main() {
|
||||||
// StackColors.fromStackColorTheme(
|
// StackColors.fromStackColorTheme(
|
||||||
// StackTheme.fromJson(
|
// StackTheme.fromJson(
|
||||||
// json: lightThemeJsonMap,
|
// json: lightThemeJsonMap,
|
||||||
// applicationThemesDirectoryPath: "test",
|
//
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ],
|
// ],
|
||||||
|
@ -385,7 +378,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -427,7 +419,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -469,7 +460,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -510,7 +500,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -17,7 +17,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -19,7 +19,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -24,7 +24,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -18,7 +18,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -21,7 +21,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
await widgetTester.pumpWidget(
|
await widgetTester.pumpWidget(
|
||||||
|
@ -35,7 +34,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -57,7 +55,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -72,7 +69,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -97,7 +93,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -112,7 +107,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -20,7 +20,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -49,7 +48,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -21,7 +21,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -55,7 +55,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
when(wallet.coin).thenAnswer((_) => Coin.bitcoin);
|
when(wallet.coin).thenAnswer((_) => Coin.bitcoin);
|
||||||
|
@ -97,7 +96,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -126,7 +124,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
when(wallet.coin).thenAnswer((_) => Coin.bitcoin);
|
when(wallet.coin).thenAnswer((_) => Coin.bitcoin);
|
||||||
|
@ -186,7 +183,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -214,7 +210,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
when(wallet.coin).thenAnswer((_) => Coin.bitcoin);
|
when(wallet.coin).thenAnswer((_) => Coin.bitcoin);
|
||||||
|
@ -274,7 +269,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -57,7 +57,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -118,7 +117,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -180,7 +178,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -63,7 +63,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -136,7 +135,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -203,7 +201,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -10,7 +10,6 @@ void main() {
|
||||||
testWidgets("Widget build", (widgetTester) async {
|
testWidgets("Widget build", (widgetTester) async {
|
||||||
final theme = StackTheme.fromJson(
|
final theme = StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
);
|
);
|
||||||
await widgetTester.pumpWidget(
|
await widgetTester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
|
|
|
@ -15,7 +15,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -25,13 +24,14 @@ void main() {
|
||||||
animationRange: 10,
|
animationRange: 10,
|
||||||
controller: ShakeController(),
|
controller: ShakeController(),
|
||||||
animationDuration: const Duration(milliseconds: 200),
|
animationDuration: const Duration(milliseconds: 200),
|
||||||
child: Column(
|
child: const Column(
|
||||||
children: const [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text("Enter Pin"),
|
child: Text("Enter Pin"),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)),
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -17,7 +17,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -39,7 +38,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -75,7 +73,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -16,7 +16,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -42,7 +42,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -80,7 +79,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -17,7 +17,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -16,7 +16,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -21,7 +21,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
final trade = Trade(
|
final trade = Trade(
|
||||||
|
@ -59,7 +58,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test/sample_data",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -93,7 +93,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
when(wallet.coin.ticker).thenAnswer((_) => "FIRO");
|
when(wallet.coin.ticker).thenAnswer((_) => "FIRO");
|
||||||
|
@ -138,7 +137,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -224,7 +222,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
when(wallet.coin.ticker).thenAnswer((_) => "FIRO");
|
when(wallet.coin.ticker).thenAnswer((_) => "FIRO");
|
||||||
|
@ -268,7 +265,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -352,7 +348,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
when(wallet.coin.ticker).thenAnswer((_) => "FIRO");
|
when(wallet.coin.ticker).thenAnswer((_) => "FIRO");
|
||||||
|
@ -397,7 +392,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -474,7 +468,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
when(wallet.coin.ticker).thenAnswer((_) => "FIRO");
|
when(wallet.coin.ticker).thenAnswer((_) => "FIRO");
|
||||||
|
@ -524,7 +517,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -42,7 +42,6 @@ void main() {
|
||||||
mockito.when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
mockito.when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
mockito.when(wallet.walletId).thenAnswer((realInvocation) => "wallet id");
|
mockito.when(wallet.walletId).thenAnswer((realInvocation) => "wallet id");
|
||||||
|
@ -81,7 +80,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -64,7 +64,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -41,7 +41,6 @@ void main() {
|
||||||
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
when(mockThemeService.getTheme(themeId: "light")).thenAnswer(
|
||||||
(_) => StackTheme.fromJson(
|
(_) => StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
when(wallet.coin).thenAnswer((_) => Coin.bitcoin);
|
when(wallet.coin).thenAnswer((_) => Coin.bitcoin);
|
||||||
|
@ -73,7 +72,6 @@ void main() {
|
||||||
StackColors.fromStackColorTheme(
|
StackColors.fromStackColorTheme(
|
||||||
StackTheme.fromJson(
|
StackTheme.fromJson(
|
||||||
json: lightThemeJsonMap,
|
json: lightThemeJsonMap,
|
||||||
applicationThemesDirectoryPath: "test",
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue