mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
desktop address book with no contacts
This commit is contained in:
parent
d084fac057
commit
7798ed39a0
4 changed files with 95 additions and 3 deletions
12
assets/svg/plus-circle.svg
Normal file
12
assets/svg/plus-circle.svg
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_5370_82626)">
|
||||||
|
<path d="M9.99935 18.3337C14.6017 18.3337 18.3327 14.6027 18.3327 10.0003C18.3327 5.39795 14.6017 1.66699 9.99935 1.66699C5.39698 1.66699 1.66602 5.39795 1.66602 10.0003C1.66602 14.6027 5.39698 18.3337 9.99935 18.3337Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M10 6.66699V13.3337" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M6.66602 10H13.3327" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_5370_82626">
|
||||||
|
<rect width="20" height="20" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 780 B |
|
@ -1,12 +1,15 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:stackwallet/models/contact.dart';
|
||||||
import 'package:stackwallet/providers/global/wallets_provider.dart';
|
import 'package:stackwallet/providers/global/wallets_provider.dart';
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/constants.dart';
|
import 'package:stackwallet/utilities/constants.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||||
import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
@ -24,6 +27,11 @@ class _DesktopAddressBook extends ConsumerState<DesktopAddressBook> {
|
||||||
|
|
||||||
late final FocusNode _searchFocusNode;
|
late final FocusNode _searchFocusNode;
|
||||||
|
|
||||||
|
List<Contact>? _cache;
|
||||||
|
List<Contact>? _cacheFav;
|
||||||
|
|
||||||
|
late bool hasContacts = false;
|
||||||
|
|
||||||
String filter = "";
|
String filter = "";
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -49,6 +57,7 @@ class _DesktopAddressBook extends ConsumerState<DesktopAddressBook> {
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
DesktopAppBar(
|
DesktopAppBar(
|
||||||
isCompactHeight: true,
|
isCompactHeight: true,
|
||||||
|
@ -127,12 +136,81 @@ class _DesktopAddressBook extends ConsumerState<DesktopAddressBook> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(width: 20),
|
||||||
|
TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getDesktopMenuButtonColorSelected(context),
|
||||||
|
onPressed: () {},
|
||||||
|
child: SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 56,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||||
|
child: SvgPicture.asset(Assets.svg.filter),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Filter",
|
||||||
|
style: STextStyles.desktopTextExtraExtraSmall(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark,
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Expanded(
|
),
|
||||||
// child: hasWallets ? const MyWallets() : const EmptyWallets(),
|
const SizedBox(width: 20),
|
||||||
// ),
|
TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getPrimaryEnabledButtonColor(context),
|
||||||
|
onPressed: () {},
|
||||||
|
child: SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 56,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||||
|
child: SvgPicture.asset(Assets.svg.circlePlus),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Add new",
|
||||||
|
style: STextStyles.desktopTextExtraExtraSmall(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.popupBG,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 26),
|
||||||
|
child: SizedBox(
|
||||||
|
width: 489,
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
"Your contacts will appear here",
|
||||||
|
style: STextStyles.itemSubtitle(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ class _SVG {
|
||||||
String txExchangeFailed(BuildContext context) =>
|
String txExchangeFailed(BuildContext context) =>
|
||||||
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-exchange-icon-failed.svg";
|
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-exchange-icon-failed.svg";
|
||||||
|
|
||||||
|
String get circlePlus => "assets/svg/plus-circle.svg";
|
||||||
String get framedGear => "assets/svg/framed-gear.svg";
|
String get framedGear => "assets/svg/framed-gear.svg";
|
||||||
String get framedAddressBook => "assets/svg/framed-address-book.svg";
|
String get framedAddressBook => "assets/svg/framed-address-book.svg";
|
||||||
String get themeLight => "assets/svg/light/light-mode.svg";
|
String get themeLight => "assets/svg/light/light-mode.svg";
|
||||||
|
|
|
@ -314,6 +314,7 @@ flutter:
|
||||||
- assets/svg/exit-desktop.svg
|
- assets/svg/exit-desktop.svg
|
||||||
- assets/svg/keys.svg
|
- assets/svg/keys.svg
|
||||||
- assets/svg/arrow-down.svg
|
- assets/svg/arrow-down.svg
|
||||||
|
- assets/svg/plus-circle.svg
|
||||||
# coin icons
|
# coin icons
|
||||||
- assets/svg/coin_icons/Bitcoin.svg
|
- assets/svg/coin_icons/Bitcoin.svg
|
||||||
- assets/svg/coin_icons/Litecoin.svg
|
- assets/svg/coin_icons/Litecoin.svg
|
||||||
|
|
Loading…
Reference in a new issue