Merge branch 'staging' into docs

This commit is contained in:
sneurlax 2023-07-03 10:53:15 -05:00 committed by GitHub
commit 925dae6f3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 227 deletions

View file

@ -8,6 +8,8 @@
* *
*/ */
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
@ -43,8 +45,10 @@ class DesktopAddressCard extends ConsumerWidget {
return Row( return Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SvgPicture.asset( SvgPicture.file(
ref.watch(coinIconProvider(entry.coin)), File(
ref.watch(coinIconProvider(entry.coin)),
),
height: 32, height: 32,
width: 32, width: 32,
), ),

View file

@ -83,10 +83,10 @@ class _DesktopSettingsViewState extends ConsumerState<DesktopSettingsView> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return DesktopScaffold( return DesktopScaffold(
background: Theme.of(context).extension<StackColors>()!.background, background: Theme.of(context).extension<StackColors>()!.background,
appBar: DesktopAppBar( appBar: const DesktopAppBar(
isCompactHeight: true, isCompactHeight: true,
leading: Row( leading: Row(
children: const [ children: [
SizedBox( SizedBox(
width: 24, width: 24,
height: 24, height: 24,
@ -97,7 +97,10 @@ class _DesktopSettingsViewState extends ConsumerState<DesktopSettingsView> {
), ),
body: Row( body: Row(
children: [ children: [
const SettingsMenu(), const Padding(
padding: EdgeInsets.all(15.0),
child: SettingsMenu(),
),
Expanded( Expanded(
child: contentViews[ child: contentViews[
ref.watch(selectedSettingsMenuItemStateProvider.state).state], ref.watch(selectedSettingsMenuItemStateProvider.state).state],

View file

@ -45,10 +45,10 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( SizedBox(
padding: const EdgeInsets.only(left: 15), width: 250,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
for (int i = 0; i < labels.length; i++) for (int i = 0; i < labels.length; i++)
Column( Column(
@ -83,157 +83,7 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
.state = newValue, .state = newValue,
), ),
], ],
) ),
// SettingsMenuItem(
// icon: SvgPicture.asset(
// Assets.svg.polygon,
// width: 11,
// height: 11,
// color: selectedMenuItem == 0
// ? Theme.of(context)
// .extension<StackColors>()!
// .accentColorBlue
// : Colors.transparent,
// ),
// label: "Backup and restore",
// value: 0,
// group: selectedMenuItem,
// onChanged: updateSelectedMenuItem,
// ),
// const SizedBox(
// height: 2,
// ),
// SettingsMenuItem(
// icon: SvgPicture.asset(
// Assets.svg.polygon,
// width: 11,
// height: 11,
// color: selectedMenuItem == 1
// ? Theme.of(context)
// .extension<StackColors>()!
// .accentColorBlue
// : Colors.transparent,
// ),
// label: "Security",
// value: 1,
// group: selectedMenuItem,
// onChanged: updateSelectedMenuItem,
// ),
// const SizedBox(
// height: 2,
// ),
// SettingsMenuItem(
// icon: SvgPicture.asset(
// Assets.svg.polygon,
// width: 11,
// height: 11,
// color: selectedMenuItem == 2
// ? Theme.of(context)
// .extension<StackColors>()!
// .accentColorBlue
// : Colors.transparent,
// ),
// label: "Currency",
// value: 2,
// group: selectedMenuItem,
// onChanged: updateSelectedMenuItem,
// ),
// const SizedBox(
// height: 2,
// ),
// SettingsMenuItem(
// icon: SvgPicture.asset(
// Assets.svg.polygon,
// width: 11,
// height: 11,
// color: selectedMenuItem == 3
// ? Theme.of(context)
// .extension<StackColors>()!
// .accentColorBlue
// : Colors.transparent,
// ),
// label: "Language",
// value: 3,
// group: selectedMenuItem,
// onChanged: updateSelectedMenuItem,
// ),
// const SizedBox(
// height: 2,
// ),
// SettingsMenuItem(
// icon: SvgPicture.asset(
// Assets.svg.polygon,
// width: 11,
// height: 11,
// color: selectedMenuItem == 4
// ? Theme.of(context)
// .extension<StackColors>()!
// .accentColorBlue
// : Colors.transparent,
// ),
// label: "Nodes",
// value: 4,
// group: selectedMenuItem,
// onChanged: updateSelectedMenuItem,
// ),
// const SizedBox(
// height: 2,
// ),
// SettingsMenuItem(
// icon: SvgPicture.asset(
// Assets.svg.polygon,
// width: 11,
// height: 11,
// color: selectedMenuItem == 5
// ? Theme.of(context)
// .extension<StackColors>()!
// .accentColorBlue
// : Colors.transparent,
// ),
// label: "Syncing preferences",
// value: 5,
// group: selectedMenuItem,
// onChanged: updateSelectedMenuItem,
// ),
// const SizedBox(
// height: 2,
// ),
// SettingsMenuItem(
// icon: SvgPicture.asset(
// Assets.svg.polygon,
// width: 11,
// height: 11,
// color: selectedMenuItem == 6
// ? Theme.of(context)
// .extension<StackColors>()!
// .accentColorBlue
// : Colors.transparent,
// ),
// label: "Appearance",
// value: 6,
// group: selectedMenuItem,
// onChanged: updateSelectedMenuItem,
// ),
// const SizedBox(
// height: 2,
// ),
// SettingsMenuItem(
// icon: SvgPicture.asset(
// Assets.svg.polygon,
// width: 11,
// height: 11,
// color: selectedMenuItem == 7
// ? Theme.of(context)
// .extension<StackColors>()!
// .accentColorBlue
// : Colors.transparent,
// ),
// label: "Advanced",
// value: 7,
// group: selectedMenuItem,
// onChanged: updateSelectedMenuItem,
// ),
], ],
), ),
), ),

View file

@ -219,44 +219,6 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
thickness: 0.5, thickness: 0.5,
), ),
), ),
Padding(
padding: const EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Debug info",
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark),
textAlign: TextAlign.left,
),
PrimaryButton(
buttonHeight: ButtonHeight.xs,
label: "Show logs",
width: 101,
onPressed: () async {
await showDialog<dynamic>(
context: context,
useSafeArea: false,
barrierDismissible: true,
builder: (context) {
return const DebugInfoDialog();
},
);
},
),
],
),
),
const Padding(
padding: EdgeInsets.all(10.0),
child: Divider(
thickness: 0.5,
),
),
Padding( Padding(
padding: const EdgeInsets.all(10), padding: const EdgeInsets.all(10),
child: Row( child: Row(
@ -327,6 +289,44 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
], ],
), ),
), ),
const Padding(
padding: EdgeInsets.all(10.0),
child: Divider(
thickness: 0.5,
),
),
Padding(
padding: const EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Debug info",
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark),
textAlign: TextAlign.left,
),
PrimaryButton(
buttonHeight: ButtonHeight.xs,
label: "Show logs",
width: 101,
onPressed: () async {
await showDialog<dynamic>(
context: context,
useSafeArea: false,
barrierDismissible: true,
builder: (context) {
return const DebugInfoDialog();
},
);
},
),
],
),
),
const SizedBox( const SizedBox(
height: 10, height: 10,
), ),

View file

@ -10,35 +10,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// todo: delete this map (example)
final map = {
"name": "Dark",
"coinColors": {
"bitcoin": "0xFF267352",
},
"assets": {
"circleLock": "svg/somerandomnamecreatedbythemecreator.svg",
},
"colors": {
"background": "0xFF848383",
},
"gradientBackground": {
"gradientType": "linear",
"begin": {
"x": 0.0,
"y": 1.0,
},
"end": {
"x": -1.0,
"y": 1.0,
},
"colors": [
"0xFF638227",
"0xFF632827",
]
}
};
extension BoxShadowExt on BoxShadow { extension BoxShadowExt on BoxShadow {
static BoxShadow fromJson(Map<String, dynamic> json) => BoxShadow( static BoxShadow fromJson(Map<String, dynamic> json) => BoxShadow(
color: Color(int.parse(json["color"] as String)), color: Color(int.parse(json["color"] as String)),

View file

@ -108,7 +108,7 @@ dependencies:
uuid: ^3.0.5 uuid: ^3.0.5
flutter_rounded_date_picker: ^3.0.1 flutter_rounded_date_picker: ^3.0.1
crypto: ^3.0.2 crypto: ^3.0.2
barcode_scan2: ^4.2.0 barcode_scan2: ^4.2.3
wakelock: ^0.6.2 wakelock: ^0.6.2
intl: ^0.17.0 intl: ^0.17.0
devicelocale: ^0.6.0 devicelocale: ^0.6.0