New themes (#2239)

* Add theme base v2

* Initial new theme base files

* Typos

* Fixes

* Update theme files

* feat: Migrate to Material 3 Theming

Foundation, Theme Data Refactor, and First Extension Cleanup Batch.

This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.

These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.

* feat: Migrate to Material 3 Theming.

This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.

* feat: Migrate to Material 3 Theming

Deleting previous theme extensions

* feat: Migrate to Material 3 Theming

Another batch of migrations from existing extensions

* feat: Migration to Material 3 Theming

Third Migration batch for theme extensions

* fwat: Migration to Material 3 Theming

Final Migration batch for previous theme extensions

* Update onboarding hero

* Update button radius

* Add surfaceContainer to light theme

* feat(themes): Migrate to Material 3 Theming

This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use

* feat(themes): Migrate to Material 3 theming

This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles

* feat(themes): Migrate to Material 3 Theming.

This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation

* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards

* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors

* Update border radius --skip-ci

* feat(themes): Migrate to Material 3 Theming.

This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.

* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes

* feat: Add fallback to previous underline styling in central widgets

This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts

* feat(themes): Update warning box colors for dark and light themes

* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.

* feat(themes): Handle themes logic during restore from backup

This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow

* Fix card gradients and spacing

* Fix even more radiuses
Test new icons for navigation_dock.dart

* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images

* Fix incorrect color for light theme

* Fix more hero images and cleanup

* Update text field icons
Fix info box CTA colors
Fix sync indicator colors

* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon

* Update page transitions in router.dart
Fix some colors

* feat(themes): Display label by default for filled textfields

* feat(themes): Refactor theme handling across various components

This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore

* feat(themes): Add animating tagline to the create pin welcome screen

* Revert text fields label temporarily, fix a couple colors, and cleanup some images

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
This commit is contained in:
tuxsudo 2025-05-25 20:11:45 +00:00 committed by GitHub
parent 7b8ddf9685
commit df88914628
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
412 changed files with 11173 additions and 13192 deletions

BIN
assets/images/2fa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

View file

@ -0,0 +1,86 @@
<svg width="260" height="298" viewBox="0 0 260 298" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M119.655 6.27832C126.055 3.53578 133.272 3.45033 139.723 6.02148L140.345 6.27832L243.044 50.293C252.699 54.431 258.96 63.925 258.96 74.4297V128.542C258.96 175.815 236.309 220.2 198.085 247.94L197.18 248.593L145.264 285.676C136.276 292.096 124.25 292.197 115.167 285.978L114.736 285.676L62.8203 248.593C24.0499 220.899 1.04004 176.187 1.04004 128.542V74.4297C1.04004 64.0891 7.10644 54.7283 16.5059 50.4912L16.9561 50.293L119.655 6.27832Z" stroke="#708BF4" stroke-opacity="0.05" stroke-width="2.08"/>
<path d="M120.451 17.2793C126.358 14.7477 133.02 14.6687 138.975 17.042L139.549 17.2793L234.349 57.9082C243.261 61.7279 249.04 70.491 249.04 80.1875V130.138C249.04 173.775 228.131 214.745 192.848 240.352L192.012 240.954L144.089 275.185C135.792 281.111 124.692 281.204 116.308 275.463L115.911 275.185L67.9883 240.954C32.2001 215.391 10.96 174.118 10.96 130.138V80.1875C10.9601 70.6424 16.56 62.0019 25.2363 58.0908L25.6514 57.9082L120.451 17.2793Z" stroke="#708BF4" stroke-opacity="0.15" stroke-width="1.92"/>
<path d="M121.294 28.3906C126.68 26.0825 132.754 26.0099 138.183 28.1738L138.706 28.3906L225.605 65.6328C233.731 69.1153 239 77.1057 239 85.9463V131.733C239 171.381 220.152 208.625 188.301 232.109L186.774 233.218L142.846 264.596C135.282 269.999 125.161 270.083 117.517 264.849L117.154 264.596L73.2256 233.218C40.4513 209.807 21 172.01 21 131.733V85.9463C21 77.2438 26.1053 69.3657 34.0156 65.7998L34.3945 65.6328L121.294 28.3906Z" stroke="#708BF4" stroke-opacity="0.5" stroke-width="2"/>
<path d="M77.8584 226.327L117.794 254.852C125.096 260.068 134.904 260.068 142.206 254.852L182.141 226.327C212.176 204.874 230 170.238 230 133.329V91.7041C230 83.3035 224.994 75.7112 217.272 72.4021L138.272 38.5449C132.99 36.281 127.01 36.281 121.728 38.5449L42.7277 72.4021C35.0063 75.7112 30 83.3035 30 91.7041V133.329C30 170.238 47.8247 204.874 77.8584 226.327Z" fill="black"/>
<path d="M77.8584 226.327L117.794 254.852C125.096 260.068 134.904 260.068 142.206 254.852L182.141 226.327C212.176 204.874 230 170.238 230 133.329V91.7041C230 83.3035 224.994 75.7112 217.272 72.4021L138.272 38.5449C132.99 36.281 127.01 36.281 121.728 38.5449L42.7277 72.4021C35.0063 75.7112 30 83.3035 30 91.7041V133.329C30 170.238 47.8247 204.874 77.8584 226.327Z" fill="url(#paint0_linear_4774_13703)"/>
<path d="M123.479 42.6295C127.513 40.9005 132.063 40.8473 136.13 42.4684L136.521 42.6295L215.521 76.4869C221.609 79.0957 225.556 85.0812 225.556 91.7037V133.329C225.556 168.248 208.955 201.05 180.902 221.734L179.559 222.711L139.623 251.236C134.047 255.219 126.615 255.343 120.923 251.609L120.377 251.236L80.4414 222.711C51.5757 202.092 34.4443 168.802 34.4443 133.329V91.7037C34.4445 85.2882 38.1486 79.4709 43.9141 76.7418L44.4785 76.4869L123.479 42.6295Z" stroke="url(#paint1_linear_4774_13703)" stroke-width="8.88889"/>
<path d="M123.479 42.6295C127.513 40.9005 132.063 40.8473 136.13 42.4684L136.521 42.6295L215.521 76.4869C221.609 79.0957 225.556 85.0812 225.556 91.7037V133.329C225.556 168.248 208.955 201.05 180.902 221.734L179.559 222.711L139.623 251.236C134.047 255.219 126.615 255.343 120.923 251.609L120.377 251.236L80.4414 222.711C51.5757 202.092 34.4443 168.802 34.4443 133.329V91.7037C34.4445 85.2882 38.1486 79.4709 43.9141 76.7418L44.4785 76.4869L123.479 42.6295Z" stroke="url(#paint2_linear_4774_13703)" stroke-width="8.88889"/>
<path d="M123.479 42.6295C127.513 40.9005 132.063 40.8473 136.13 42.4684L136.521 42.6295L215.521 76.4869C221.609 79.0957 225.556 85.0812 225.556 91.7037V133.329C225.556 168.248 208.955 201.05 180.902 221.734L179.559 222.711L139.623 251.236C134.047 255.219 126.615 255.343 120.923 251.609L120.377 251.236L80.4414 222.711C51.5757 202.092 34.4443 168.802 34.4443 133.329V91.7037C34.4445 85.2882 38.1486 79.4709 43.9141 76.7418L44.4785 76.4869L123.479 42.6295Z" stroke="url(#paint3_linear_4774_13703)" stroke-width="8.88889"/>
<g filter="url(#filter0_ii_4774_13703)">
<path d="M77.8584 226.327L117.794 254.852C125.096 260.068 134.904 260.068 142.206 254.852L182.141 226.327C212.176 204.874 230 170.238 230 133.329V91.7041C230 83.3035 224.994 75.7112 217.272 72.4021L138.272 38.5449C132.99 36.281 127.01 36.281 121.728 38.5449L42.7277 72.4021C35.0063 75.7112 30 83.3035 30 91.7041V133.329C30 170.238 47.8247 204.874 77.8584 226.327Z" fill="black" fill-opacity="0.01"/>
</g>
<rect x="66.5" y="110.5" width="127" height="69.5833" rx="9.33333" fill="url(#paint4_linear_4774_13703)" fill-opacity="0.15" stroke="url(#paint5_linear_4774_13703)" stroke-width="3"/>
<g filter="url(#filter1_d_4774_13703)">
<path d="M85.027 155.008L85.4252 147.997L79.5392 151.857L77.4272 148.187L83.7113 145.037L77.4272 141.886L79.5392 138.216L85.4252 142.076L85.027 135.065H89.2338L88.8529 142.076L94.739 138.216L96.851 141.886L90.5495 145.037L96.851 148.187L94.739 151.857L88.8529 147.997L89.2338 155.008H85.027ZM113.447 155.008L113.845 147.997L107.959 151.857L105.847 148.187L112.131 145.037L105.847 141.886L107.959 138.216L113.845 142.076L113.447 135.065H117.654L117.273 142.076L123.159 138.216L125.271 141.886L118.969 145.037L125.271 148.187L123.159 151.857L117.273 147.997L117.654 155.008H113.447ZM141.866 155.008L142.265 147.997L136.379 151.857L134.267 148.187L140.551 145.037L134.267 141.886L136.379 138.216L142.265 142.076L141.866 135.065H146.073L145.692 142.076L151.578 138.216L153.69 141.886L147.389 145.037L153.69 148.187L151.578 151.857L145.692 147.997L146.073 155.008H141.866ZM170.286 155.008L170.684 147.997L164.798 151.857L162.686 148.187L168.971 145.037L162.686 141.886L164.798 138.216L170.684 142.076L170.286 135.065H174.493L174.112 142.076L179.998 138.216L182.11 141.886L175.809 145.037L182.11 148.187L179.998 151.857L174.112 147.997L174.493 155.008H170.286Z" fill="#EFEFF8"/>
</g>
<path d="M164.716 223.419H215.284C220.845 223.419 224.31 217.386 221.508 212.583L196.224 169.239C193.443 164.473 186.556 164.473 183.776 169.239L158.492 212.583C155.69 217.386 159.155 223.419 164.716 223.419Z" fill="#D9D9D9"/>
<path d="M164.716 223.419H215.284C220.845 223.419 224.31 217.386 221.508 212.583L196.224 169.239C193.443 164.473 186.556 164.473 183.776 169.239L158.492 212.583C155.69 217.386 159.155 223.419 164.716 223.419Z" fill="url(#paint6_linear_4774_13703)"/>
<path d="M164.716 223.419H215.284C220.845 223.419 224.31 217.386 221.508 212.583L196.224 169.239C193.443 164.473 186.556 164.473 183.776 169.239L158.492 212.583C155.69 217.386 159.155 223.419 164.716 223.419Z" stroke="#312938" stroke-width="3.25" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M164.716 223.419H215.284C220.845 223.419 224.31 217.386 221.508 212.583L196.224 169.239C193.443 164.473 186.556 164.473 183.776 169.239L158.492 212.583C155.69 217.386 159.155 223.419 164.716 223.419Z" stroke="url(#paint7_linear_4774_13703)" stroke-width="3.25" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M164.716 223.419H215.284C220.845 223.419 224.31 217.386 221.508 212.583L196.224 169.239C193.443 164.473 186.556 164.473 183.776 169.239L158.492 212.583C155.69 217.386 159.155 223.419 164.716 223.419Z" stroke="url(#paint8_linear_4774_13703)" stroke-width="3.25" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M189.925 208.897H189.961M189.925 198.089V187.281" stroke="#312938" stroke-width="7.20545" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<filter id="filter0_ii_4774_13703" x="30" y="36.8469" width="200" height="221.917" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/>
<feBlend mode="plus-lighter" in2="shape" result="effect1_innerShadow_4774_13703"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="-2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"/>
<feBlend mode="normal" in2="effect1_innerShadow_4774_13703" result="effect2_innerShadow_4774_13703"/>
</filter>
<filter id="filter1_d_4774_13703" x="68.1106" y="125.748" width="123.316" height="38.5765" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="4.65833"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.937255 0 0 0 0 0.937255 0 0 0 0 0.972549 0 0 0 0.3 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4774_13703"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4774_13703" result="shape"/>
</filter>
<linearGradient id="paint0_linear_4774_13703" x1="130" y1="34.9996" x2="130" y2="263.571" gradientUnits="userSpaceOnUse">
<stop stop-color="#19233C"/>
<stop offset="1" stop-color="#1647C3"/>
</linearGradient>
<linearGradient id="paint1_linear_4774_13703" x1="130" y1="34.9996" x2="130" y2="263.571" gradientUnits="userSpaceOnUse">
<stop stop-color="#C1F2FF"/>
<stop offset="0.42" stop-color="#2077F8"/>
<stop offset="0.700262" stop-color="#000F4D"/>
</linearGradient>
<linearGradient id="paint2_linear_4774_13703" x1="130" y1="34.9996" x2="130" y2="263.571" gradientUnits="userSpaceOnUse">
<stop stop-color="#C1F2FF"/>
<stop offset="0.700262" stop-color="#718CF5"/>
</linearGradient>
<linearGradient id="paint3_linear_4774_13703" x1="130" y1="34.9996" x2="130" y2="263.571" gradientUnits="userSpaceOnUse">
<stop stop-color="#D8E3FF"/>
<stop offset="0.700262" stop-color="#718CF5"/>
</linearGradient>
<linearGradient id="paint4_linear_4774_13703" x1="130" y1="109" x2="130" y2="181.583" gradientUnits="userSpaceOnUse">
<stop stop-color="#5590FF"/>
<stop offset="1" stop-color="#5590FF" stop-opacity="0.5"/>
</linearGradient>
<linearGradient id="paint5_linear_4774_13703" x1="190.695" y1="181.583" x2="69.3054" y2="109" gradientUnits="userSpaceOnUse">
<stop stop-color="#EFEFF8" stop-opacity="0"/>
<stop offset="1" stop-color="#EFEFF8"/>
</linearGradient>
<linearGradient id="paint6_linear_4774_13703" x1="190" y1="165.664" x2="190.433" y2="233.264" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFC414"/>
<stop offset="1" stop-color="#FF9500"/>
</linearGradient>
<linearGradient id="paint7_linear_4774_13703" x1="190" y1="165.664" x2="190" y2="223.419" gradientUnits="userSpaceOnUse">
<stop stop-color="#5C486E"/>
<stop offset="1" stop-color="#312938"/>
</linearGradient>
<linearGradient id="paint8_linear_4774_13703" x1="190" y1="165.664" x2="190" y2="223.419" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#EBD4FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,101 @@
<svg width="260" height="298" viewBox="0 0 260 298" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M119.655 6.2793C126.055 3.53675 133.272 3.4513 139.723 6.02246L140.345 6.2793L243.044 50.2939C252.699 54.432 258.96 63.9259 258.96 74.4307V128.543C258.96 175.816 236.309 220.201 198.085 247.941L197.18 248.594L145.264 285.677C136.276 292.097 124.25 292.198 115.167 285.979L114.736 285.677L62.8203 248.594C24.0499 220.9 1.04004 176.188 1.04004 128.543V74.4307C1.04004 64.09 7.10644 54.7293 16.5059 50.4922L16.9561 50.2939L119.655 6.2793Z" stroke="#4A98DC" stroke-opacity="0.05" stroke-width="2.08"/>
<path d="M120.451 17.2803C126.358 14.7487 133.02 14.6696 138.975 17.043L139.549 17.2803L234.349 57.9092C243.261 61.7289 249.04 70.492 249.04 80.1885V130.139C249.04 173.775 228.131 214.746 192.848 240.353L192.012 240.955L144.089 275.186C135.792 281.112 124.692 281.205 116.308 275.464L115.911 275.186L67.9883 240.955C32.2001 215.392 10.96 174.119 10.96 130.139V80.1885C10.9601 70.6434 16.56 62.0028 25.2363 58.0918L25.6514 57.9092L120.451 17.2803Z" stroke="#4B98DC" stroke-opacity="0.15" stroke-width="1.92"/>
<path d="M121.294 28.3916C126.68 26.0835 132.754 26.0109 138.183 28.1748L138.706 28.3916L225.605 65.6338C233.731 69.1163 239 77.1066 239 85.9473V131.734C239 171.382 220.152 208.626 188.301 232.11L186.774 233.219L142.846 264.597C135.282 270 125.161 270.084 117.517 264.85L117.154 264.597L73.2256 233.219C40.4513 209.808 21 172.011 21 131.734V85.9473C21 77.2448 26.1053 69.3666 34.0156 65.8008L34.3945 65.6338L121.294 28.3916Z" stroke="#4895DB" stroke-opacity="0.35" stroke-width="2"/>
<path d="M77.8584 226.328L117.794 254.853C125.096 260.069 134.904 260.069 142.206 254.853L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7051C230 83.3045 224.994 75.7122 217.272 72.403L138.272 38.5459C132.99 36.2819 127.01 36.2819 121.728 38.5459L42.7277 72.403C35.0063 75.7122 30 83.3045 30 91.7051V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="black"/>
<path d="M77.8584 226.328L117.794 254.853C125.096 260.069 134.904 260.069 142.206 254.853L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7051C230 83.3045 224.994 75.7122 217.272 72.403L138.272 38.5459C132.99 36.2819 127.01 36.2819 121.728 38.5459L42.7277 72.403C35.0063 75.7122 30 83.3045 30 91.7051V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="url(#paint0_linear_4774_13798)"/>
<path d="M77.8584 226.328L117.794 254.853C125.096 260.069 134.904 260.069 142.206 254.853L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7051C230 83.3045 224.994 75.7122 217.272 72.403L138.272 38.5459C132.99 36.2819 127.01 36.2819 121.728 38.5459L42.7277 72.403C35.0063 75.7122 30 83.3045 30 91.7051V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="url(#paint1_linear_4774_13798)"/>
<path d="M77.8584 226.328L117.794 254.853C125.096 260.069 134.904 260.069 142.206 254.853L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7051C230 83.3045 224.994 75.7122 217.272 72.403L138.272 38.5459C132.99 36.2819 127.01 36.2819 121.728 38.5459L42.7277 72.403C35.0063 75.7122 30 83.3045 30 91.7051V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="url(#paint2_linear_4774_13798)"/>
<path d="M77.8584 226.328L117.794 254.853C125.096 260.069 134.904 260.069 142.206 254.853L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7051C230 83.3045 224.994 75.7122 217.272 72.403L138.272 38.5459C132.99 36.2819 127.01 36.2819 121.728 38.5459L42.7277 72.403C35.0063 75.7122 30 83.3045 30 91.7051V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="url(#paint3_linear_4774_13798)"/>
<path d="M123.479 42.6305C127.513 40.9015 132.063 40.8482 136.13 42.4693L136.521 42.6305L215.521 76.4879C221.609 79.0967 225.556 85.0821 225.556 91.7047V133.33C225.556 168.249 208.955 201.051 180.902 221.735L179.559 222.712L139.623 251.237C134.047 255.22 126.615 255.344 120.923 251.61L120.377 251.237L80.4414 222.712C51.5757 202.093 34.4443 168.803 34.4443 133.33V91.7047C34.4445 85.2892 38.1486 79.4719 43.9141 76.7428L44.4785 76.4879L123.479 42.6305Z" stroke="url(#paint4_linear_4774_13798)" stroke-width="8.88889"/>
<path d="M123.479 42.6305C127.513 40.9015 132.063 40.8482 136.13 42.4693L136.521 42.6305L215.521 76.4879C221.609 79.0967 225.556 85.0821 225.556 91.7047V133.33C225.556 168.249 208.955 201.051 180.902 221.735L179.559 222.712L139.623 251.237C134.047 255.22 126.615 255.344 120.923 251.61L120.377 251.237L80.4414 222.712C51.5757 202.093 34.4443 168.803 34.4443 133.33V91.7047C34.4445 85.2892 38.1486 79.4719 43.9141 76.7428L44.4785 76.4879L123.479 42.6305Z" stroke="url(#paint5_linear_4774_13798)" stroke-width="8.88889"/>
<path d="M123.479 42.6305C127.513 40.9015 132.063 40.8482 136.13 42.4693L136.521 42.6305L215.521 76.4879C221.609 79.0967 225.556 85.0821 225.556 91.7047V133.33C225.556 168.249 208.955 201.051 180.902 221.735L179.559 222.712L139.623 251.237C134.047 255.22 126.615 255.344 120.923 251.61L120.377 251.237L80.4414 222.712C51.5757 202.093 34.4443 168.803 34.4443 133.33V91.7047C34.4445 85.2892 38.1486 79.4719 43.9141 76.7428L44.4785 76.4879L123.479 42.6305Z" stroke="url(#paint6_linear_4774_13798)" stroke-width="8.88889"/>
<path d="M123.479 42.6305C127.513 40.9015 132.063 40.8482 136.13 42.4693L136.521 42.6305L215.521 76.4879C221.609 79.0967 225.556 85.0821 225.556 91.7047V133.33C225.556 168.249 208.955 201.051 180.902 221.735L179.559 222.712L139.623 251.237C134.047 255.22 126.615 255.344 120.923 251.61L120.377 251.237L80.4414 222.712C51.5757 202.093 34.4443 168.803 34.4443 133.33V91.7047C34.4445 85.2892 38.1486 79.4719 43.9141 76.7428L44.4785 76.4879L123.479 42.6305Z" stroke="url(#paint7_linear_4774_13798)" stroke-width="8.88889"/>
<g filter="url(#filter0_ii_4774_13798)">
<path d="M77.8584 226.328L117.794 254.853C125.096 260.069 134.904 260.069 142.206 254.853L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7051C230 83.3045 224.994 75.7122 217.272 72.403L138.272 38.5459C132.99 36.2819 127.01 36.2819 121.728 38.5459L42.7277 72.403C35.0063 75.7122 30 83.3045 30 91.7051V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="black" fill-opacity="0.01"/>
</g>
<rect x="67" y="111" width="126" height="68.5833" rx="8.83333" fill="url(#paint8_linear_4774_13798)" stroke="url(#paint9_linear_4774_13798)" stroke-width="4"/>
<g filter="url(#filter1_d_4774_13798)">
<path d="M85.027 155.008L85.4252 147.997L79.5392 151.857L77.4272 148.187L83.7113 145.037L77.4272 141.886L79.5392 138.216L85.4252 142.076L85.027 135.065H89.2338L88.8529 142.076L94.739 138.216L96.851 141.886L90.5495 145.037L96.851 148.187L94.739 151.857L88.8529 147.997L89.2338 155.008H85.027ZM113.447 155.008L113.845 147.997L107.959 151.857L105.847 148.187L112.131 145.037L105.847 141.886L107.959 138.216L113.845 142.076L113.447 135.065H117.654L117.273 142.076L123.159 138.216L125.271 141.886L118.969 145.037L125.271 148.187L123.159 151.857L117.273 147.997L117.654 155.008H113.447ZM141.866 155.008L142.265 147.997L136.379 151.857L134.267 148.187L140.551 145.037L134.267 141.886L136.379 138.216L142.265 142.076L141.866 135.065H146.073L145.692 142.076L151.578 138.216L153.69 141.886L147.389 145.037L153.69 148.187L151.578 151.857L145.692 147.997L146.073 155.008H141.866ZM170.286 155.008L170.684 147.997L164.798 151.857L162.686 148.187L168.971 145.037L162.686 141.886L164.798 138.216L170.684 142.076L170.286 135.065H174.493L174.112 142.076L179.998 138.216L182.11 141.886L175.809 145.037L182.11 148.187L179.998 151.857L174.112 147.997L174.493 155.008H170.286Z" fill="#2C71CC"/>
</g>
<path d="M164.716 223.418H215.284C220.845 223.418 224.31 217.386 221.508 212.582L196.224 169.239C193.443 164.472 186.556 164.472 183.776 169.239L158.492 212.582C155.69 217.386 159.155 223.418 164.716 223.418Z" fill="#D9D9D9"/>
<path d="M164.716 223.418H215.284C220.845 223.418 224.31 217.386 221.508 212.582L196.224 169.239C193.443 164.472 186.556 164.472 183.776 169.239L158.492 212.582C155.69 217.386 159.155 223.418 164.716 223.418Z" fill="url(#paint10_linear_4774_13798)"/>
<path d="M164.716 223.418H215.284C220.845 223.418 224.31 217.386 221.508 212.582L196.224 169.239C193.443 164.472 186.556 164.472 183.776 169.239L158.492 212.582C155.69 217.386 159.155 223.418 164.716 223.418Z" stroke="#312938" stroke-width="3.25" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M164.716 223.418H215.284C220.845 223.418 224.31 217.386 221.508 212.582L196.224 169.239C193.443 164.472 186.556 164.472 183.776 169.239L158.492 212.582C155.69 217.386 159.155 223.418 164.716 223.418Z" stroke="url(#paint11_linear_4774_13798)" stroke-width="3.25" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M189.925 208.896H189.961M189.925 198.088V187.28" stroke="#312938" stroke-width="7.20545" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<filter id="filter0_ii_4774_13798" x="30" y="36.8479" width="200" height="221.917" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_4774_13798"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="-2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.022328 0 0 0 0 0.298259 0 0 0 0 0.663462 0 0 0 1 0"/>
<feBlend mode="normal" in2="effect1_innerShadow_4774_13798" result="effect2_innerShadow_4774_13798"/>
</filter>
<filter id="filter1_d_4774_13798" x="68.1106" y="125.748" width="123.316" height="38.5765" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="4.65833"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.172549 0 0 0 0 0.443137 0 0 0 0 0.8 0 0 0 0.3 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4774_13798"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4774_13798" result="shape"/>
</filter>
<linearGradient id="paint0_linear_4774_13798" x1="130" y1="35.0006" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#002A52"/>
<stop offset="1" stop-color="#0652DF"/>
</linearGradient>
<linearGradient id="paint1_linear_4774_13798" x1="130" y1="35.0006" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#19233C"/>
<stop offset="1" stop-color="#144CD8"/>
</linearGradient>
<linearGradient id="paint2_linear_4774_13798" x1="130" y1="35.0006" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#19233C"/>
<stop offset="1" stop-color="#1647C3"/>
</linearGradient>
<linearGradient id="paint3_linear_4774_13798" x1="130" y1="35.0006" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop offset="0.144488" stop-color="#FAFAFA"/>
<stop offset="1" stop-color="#72AAFF"/>
</linearGradient>
<linearGradient id="paint4_linear_4774_13798" x1="130" y1="35.0006" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#C1F2FF"/>
<stop offset="0.42" stop-color="#2077F8"/>
<stop offset="0.700262" stop-color="#000F4D"/>
</linearGradient>
<linearGradient id="paint5_linear_4774_13798" x1="130" y1="35.0006" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#C1F2FF"/>
<stop offset="0.700262" stop-color="#718CF5"/>
</linearGradient>
<linearGradient id="paint6_linear_4774_13798" x1="130" y1="35.0006" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#D8E3FF"/>
<stop offset="0.700262" stop-color="#718CF5"/>
</linearGradient>
<linearGradient id="paint7_linear_4774_13798" x1="130" y1="35.0006" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#68BEEF"/>
<stop offset="0.700262" stop-color="#2C71CC"/>
</linearGradient>
<linearGradient id="paint8_linear_4774_13798" x1="147.5" y1="170" x2="69.5" y2="100" gradientUnits="userSpaceOnUse">
<stop offset="0.0455724" stop-color="white" stop-opacity="0"/>
<stop offset="1" stop-color="white" stop-opacity="0.5"/>
</linearGradient>
<linearGradient id="paint9_linear_4774_13798" x1="65" y1="109" x2="195" y2="185.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#4794DA"/>
<stop offset="0.954879" stop-color="#72AAFF" stop-opacity="0.2"/>
</linearGradient>
<linearGradient id="paint10_linear_4774_13798" x1="190" y1="165.664" x2="190.433" y2="233.264" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFC414"/>
<stop offset="1" stop-color="#FF9500"/>
</linearGradient>
<linearGradient id="paint11_linear_4774_13798" x1="190" y1="165.664" x2="190" y2="223.418" gradientUnits="userSpaceOnUse">
<stop stop-color="#5C486E"/>
<stop offset="1" stop-color="#312938"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Before After
Before After

View file

@ -1,31 +0,0 @@
<svg width="163" height="178" viewBox="0 0 163 178" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M47.5763 28.5814C46.1363 28.5814 44.9689 27.414 44.9689 25.974V22.2461C44.9689 20.8061 46.1363 19.6387 47.5763 19.6387C49.0163 19.6387 50.1837 20.8061 50.1837 22.2461V25.974C50.1837 27.414 49.0163 28.5814 47.5763 28.5814Z" fill="#14C846"/>
<path d="M81.252 28.5814C79.812 28.5814 78.6445 27.414 78.6445 25.974V22.2461C78.6445 20.8061 79.812 19.6387 81.252 19.6387C82.6919 19.6387 83.8594 20.8061 83.8594 22.2461V25.974C83.8594 27.414 82.6919 28.5814 81.252 28.5814Z" fill="#14C846"/>
<path d="M114.928 28.5814C113.488 28.5814 112.32 27.414 112.32 25.974V22.2461C112.32 20.8061 113.488 19.6387 114.928 19.6387C116.368 19.6387 117.535 20.8061 117.535 22.2461V25.974C117.535 27.414 116.368 28.5814 114.928 28.5814Z" fill="#14C846"/>
<path d="M119.675 5.23777C118.208 2.28443 115.374 -2.62586 112.117 1.72088C109.646 5.02118 107.251 11.045 111.084 14.2782C113.143 16.0161 116.707 16.0196 118.771 14.2782C121.501 11.9753 121.084 8.07603 119.675 5.23777Z" fill="#FC914A"/>
<path d="M85.9992 5.23777C84.5328 2.28443 81.698 -2.62586 78.4419 1.72088C75.9701 5.02118 73.5754 11.045 77.408 14.2782C79.4678 16.0161 83.0317 16.0196 85.0957 14.2782C87.8255 11.9753 87.4086 8.07603 85.9992 5.23777Z" fill="#FC914A"/>
<path d="M147.295 113.917H15.2089V60.2027C15.2089 54.4747 19.8525 49.8311 25.5805 49.8311H136.923C142.651 49.8311 147.295 54.4747 147.295 60.2027V113.917Z" fill="#A06047"/>
<path d="M120.67 56.9909H109.185C108.196 56.9909 107.395 56.1892 107.395 55.2005V27.7645C107.395 26.7758 108.196 25.9741 109.185 25.9741H120.67C121.659 25.9741 122.461 26.7758 122.461 27.7645V55.2008C122.461 56.1896 121.659 56.9909 120.67 56.9909Z" fill="#14C846"/>
<path d="M86.9945 56.9909H75.5094C74.5206 56.9909 73.7189 56.1892 73.7189 55.2005V27.7645C73.7189 26.7758 74.5206 25.9741 75.5094 25.9741H86.9945C87.9832 25.9741 88.7849 26.7758 88.7849 27.7645V55.2008C88.7846 56.1896 87.9832 56.9909 86.9945 56.9909Z" fill="#14C846"/>
<path d="M52.3235 5.23777C50.8571 2.28443 48.0223 -2.62586 44.7662 1.72088C42.2943 5.02118 39.8997 11.045 43.7322 14.2782C45.7921 16.0161 49.3559 16.0196 51.4199 14.2782C54.1497 11.9753 53.7326 8.07603 52.3235 5.23777Z" fill="#FC914A"/>
<path d="M51.4183 14.2785C49.8107 15.6354 47.2898 15.9327 45.2776 15.1737C45.8432 14.9589 46.3696 14.6616 46.8243 14.2785C49.5527 11.9764 49.1373 8.07705 47.7265 5.2374C47.1 3.96985 46.2191 2.34421 45.1591 1.24145C48.249 -2.23546 50.9131 2.40158 52.3239 5.2374C53.7316 8.07705 54.1505 11.9764 51.4183 14.2785Z" fill="#EA7636"/>
<path d="M85.0943 14.2785C83.4867 15.6354 80.9659 15.9327 78.9536 15.1737C79.5193 14.9589 80.0456 14.6616 80.5004 14.2785C83.2288 11.9764 82.8133 8.07705 81.4025 5.2374C80.776 3.96985 79.8951 2.34421 78.8351 1.24145C81.925 -2.23546 84.5891 2.40158 85.9999 5.2374C87.4076 8.07705 87.8265 11.9764 85.0943 14.2785Z" fill="#EA7636"/>
<path d="M118.77 14.2785C117.163 15.6354 114.642 15.9327 112.63 15.1737C113.195 14.9589 113.722 14.6616 114.176 14.2785C116.905 11.9764 116.489 8.07705 115.078 5.2374C114.452 3.96985 113.571 2.34421 112.511 1.24145C115.601 -2.23546 118.265 2.40158 119.676 5.2374C121.083 8.07705 121.502 11.9764 118.77 14.2785Z" fill="#EA7636"/>
<path d="M53.3189 56.9909H41.8338C40.845 56.9909 40.0433 56.1892 40.0433 55.2005V27.7645C40.0433 26.7758 40.845 25.9741 41.8338 25.9741H53.3189C54.3076 25.9741 55.1093 26.7758 55.1093 27.7645V55.2008C55.109 56.1896 54.3076 56.9909 53.3189 56.9909Z" fill="#14C846"/>
<path d="M55.11 27.7659V55.2005C55.11 56.1888 54.3079 56.9909 53.3196 56.9909H48.8331V25.9758H53.3196C54.3079 25.9758 55.11 26.7744 55.11 27.7659Z" fill="#0EA939"/>
<path d="M88.7846 27.7659V55.2005C88.7846 56.1888 87.9826 56.9909 86.9942 56.9909H82.5077V25.9758H86.9942C87.9826 25.9758 88.7846 26.7744 88.7846 27.7659Z" fill="#0EA939"/>
<path d="M122.461 27.7659V55.2005C122.461 56.1888 121.659 56.9909 120.67 56.9909H116.184V25.9758H120.67C121.659 25.9758 122.461 26.7744 122.461 27.7659Z" fill="#0EA939"/>
<path d="M147.295 60.2028V113.916H134.809V60.2028C134.809 54.4738 130.169 49.8298 124.44 49.8298H136.922C142.651 49.8298 147.295 54.4738 147.295 60.2028Z" fill="#824730"/>
<path d="M147.296 60.2028V65.6885C144.844 67.6973 142.502 69.7953 137.607 69.7953C136.569 69.7953 135.645 69.7022 134.811 69.5304V60.2028C134.811 54.4738 130.17 49.8298 124.441 49.8298H136.923C142.652 49.8298 147.296 54.4738 147.296 60.2028Z" fill="#F7D443"/>
<path d="M162.503 178H0.000671387V124.286C0.000671387 118.558 4.64431 113.915 10.3723 113.915H152.131C157.859 113.915 162.503 118.558 162.503 124.286L162.503 178Z" fill="#A06047"/>
<path d="M162.503 124.286V177.999H147.296V124.286C147.296 118.557 142.652 113.916 136.923 113.916H152.13C157.859 113.916 162.503 118.557 162.503 124.286Z" fill="#824730"/>
<path d="M162.503 124.286V129.771C159.488 131.78 156.602 133.882 150.583 133.882C149.37 133.882 148.281 133.796 147.296 133.642V124.286C147.296 118.557 142.652 113.917 136.923 113.917H152.13C157.859 113.916 162.503 118.557 162.503 124.286Z" fill="#F7D443"/>
<path d="M147.293 83.5281H15.2078V96.4157H147.293V83.5281Z" fill="white"/>
<path d="M147.294 83.5281H134.808V96.4157H147.294V83.5281Z" fill="#C7ABA1"/>
<path d="M162.502 147.615H0.000671387V160.502H162.502V147.615Z" fill="white"/>
<path d="M162.504 147.615H147.296V160.502H162.504V147.615Z" fill="#C7ABA1"/>
<path d="M147.295 60.2028V65.6868C144.844 67.6973 142.501 69.7971 137.606 69.7971C128.214 69.7971 128.214 62.0638 118.822 62.0638C109.43 62.0638 109.43 69.7971 100.034 69.7971C90.6422 69.7971 90.6422 62.0638 81.2502 62.0638C71.8583 62.0638 71.8583 69.7971 62.4664 69.7971C53.0745 69.7971 53.0745 62.0638 43.6826 62.0638C34.2907 62.0638 34.2907 69.7971 24.8988 69.7971C20.0076 69.7971 17.6644 67.6976 15.2131 65.6868V60.2028C15.2131 54.4738 19.8574 49.8298 25.5861 49.8298H136.922C142.651 49.8298 147.295 54.4738 147.295 60.2028Z" fill="#2194FF"/>
<path d="M147.296 61.03V65.6883C144.844 67.697 142.502 69.7951 137.607 69.7951C136.569 69.7951 135.645 69.7019 134.811 69.5302V60.2026C134.811 54.4736 130.17 49.8296 124.441 49.8296H136.096C143.689 49.8299 147.296 54.6637 147.296 61.03Z" fill="#1585EC"/>
<path d="M162.504 125.114V129.77C159.488 131.781 156.604 133.881 150.584 133.881C139.026 133.881 139.026 126.148 127.469 126.148C115.916 126.148 115.916 133.881 104.359 133.881C92.8053 133.881 92.8053 126.148 81.2481 126.148C69.6949 126.148 69.6949 133.881 58.1377 133.881C46.5845 133.881 46.5845 126.148 35.0273 126.148C23.4741 126.148 23.4741 133.881 11.9169 133.881C5.89659 133.881 3.01591 131.781 0 129.77V124.287C0 118.558 4.64433 113.914 10.373 113.914H151.305C157.49 113.914 162.504 118.928 162.504 125.114Z" fill="#2194FF"/>
<path d="M162.503 125.113V129.771C159.488 131.78 156.602 133.882 150.583 133.882C149.37 133.882 148.281 133.796 147.296 133.642V124.286C147.296 118.557 142.652 113.916 136.923 113.916H151.593C158.474 113.916 162.503 118.048 162.503 125.113Z" fill="#1585EC"/>
</svg>

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

View file

@ -0,0 +1,3 @@
<svg width="28" height="37" viewBox="0 0 28 37" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M26.0117 0.00835344C26.0523 -0.000438375 26.0914 -0.00211226 26.1279 0.00249407C26.3832 0.0346771 26.5225 0.363833 26.3174 0.5689L11.9326 14.9625C11.4874 15.4075 11.2364 16.0124 11.2354 16.6421V35.7369C11.2354 35.8853 11.146 35.9965 11.0303 36.0445C10.9723 36.0685 10.9079 36.0769 10.8447 36.066C10.7815 36.055 10.7195 36.0247 10.667 35.9722L0.396484 25.7056C0.20853 25.5177 0.10361 25.2641 0.103516 24.9996V7.18218C0.103551 6.28774 0.727312 5.51391 1.60156 5.32378L26.0107 0.00835344H26.0117ZM27.1025 20.2906C27.1024 20.5551 26.9964 20.8079 26.8096 20.9947L12.9443 34.8316C12.9218 34.8541 12.8953 34.867 12.8682 34.8716C12.8413 34.8762 12.8137 34.873 12.7891 34.8628C12.7394 34.8423 12.7012 34.7942 12.7012 34.731L12.7031 27.6763L17.3975 23.0289C18.0656 22.4518 18.3422 22.2068 18.7549 22.1832C18.8235 22.1792 18.896 22.1822 18.9746 22.19C19.0532 22.1978 19.138 22.2106 19.2314 22.2291C19.6039 22.3026 19.9558 22.357 20.2842 22.3755C20.4156 22.3829 20.5432 22.3847 20.667 22.3794C21.2241 22.356 21.7026 22.1937 22.0898 21.7945C22.427 21.4466 22.853 20.8957 23.0713 19.4947C23.2236 18.5107 23.33 17.8883 23.5439 17.3169C23.7579 16.7456 24.0748 16.3552 24.4551 15.9761V15.9752L27.1201 13.2974L27.1025 20.2906ZM26.9834 7.87359C27.0584 7.90479 27.1162 7.97749 27.1162 8.07378L27.0967 11.2144L24.1006 14.3306C23.5194 14.8954 22.9476 15.67 22.6914 16.2759C22.4364 16.8808 22.1497 17.8845 22.0049 18.7476C21.8611 19.6097 21.8812 20.1323 21.1377 20.6011C20.9985 20.6888 20.8632 20.7369 20.7295 20.7574C20.6402 20.7711 20.5516 20.7729 20.4629 20.7652C20.0187 20.7267 19.5718 20.4629 19.0273 20.4019C18.973 20.3958 18.9177 20.3918 18.8613 20.3902L18.8604 20.3912C17.9582 20.3653 17.3076 21.023 17.3057 21.025L12.7021 25.6441V22.5533C12.7021 22.1752 12.8521 21.8114 13.1201 21.5435L26.749 7.92046C26.7832 7.88634 26.8233 7.86688 26.8643 7.85992C26.9048 7.85303 26.9462 7.85813 26.9834 7.87359ZM26.9277 2.16753C27.0287 2.17924 27.12 2.26134 27.1201 2.3814V5.49956H27.1211L12.7021 19.9498V16.8648C12.7022 16.4869 12.8522 16.1238 13.1201 15.856L26.752 2.22906C26.8026 2.17847 26.8672 2.16051 26.9277 2.16753Z" fill="#D7E2F7"/>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1,3 @@
<svg width="28" height="37" viewBox="0 0 28 37" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M26.0117 0.00769167C26.0523 -0.00110449 26.0914 -0.00180576 26.1279 0.00280886C26.3831 0.0350288 26.5224 0.363182 26.3174 0.568239L11.9326 14.9618C11.4874 15.4069 11.2364 16.0127 11.2354 16.6425V35.7372C11.2353 35.8856 11.1461 35.9969 11.0303 36.0448C10.9724 36.0688 10.9078 36.0772 10.8447 36.0663C10.7815 36.0554 10.7195 36.025 10.667 35.9725L0.396484 25.7059C0.208445 25.518 0.103516 25.2635 0.103516 24.9989V7.1825C0.103516 6.28802 0.727287 5.51423 1.60156 5.3241L26.0107 0.00769167H26.0117ZM27.1025 20.2899C27.1025 20.5545 26.9964 20.8071 26.8096 20.994L12.9443 34.8319C12.9218 34.8543 12.8952 34.8674 12.8682 34.8719C12.8413 34.8765 12.8138 34.8724 12.7891 34.8622C12.7396 34.8417 12.7013 34.7944 12.7012 34.7313L12.7031 27.6757L17.3975 23.0282C18.0655 22.4511 18.3423 22.2071 18.7549 22.1835C18.8235 22.1795 18.896 22.1815 18.9746 22.1893C19.0532 22.1971 19.138 22.2109 19.2314 22.2294C19.6039 22.303 19.9558 22.3574 20.2842 22.3759C20.4155 22.3833 20.5432 22.385 20.667 22.3798C21.224 22.3563 21.7026 22.1939 22.0898 21.7948C22.427 21.447 22.853 20.896 23.0713 19.495C23.2236 18.5109 23.33 17.8887 23.5439 17.3173C23.7579 16.7458 24.0747 16.3556 24.4551 15.9764V15.9755L27.1201 13.2977L27.1025 20.2899ZM26.9834 7.8739C27.0584 7.90515 27.1162 7.97782 27.1162 8.0741L27.0967 11.2137L24.1006 14.3309C23.5192 14.8958 22.9476 15.6702 22.6914 16.2762C22.4364 16.8812 22.1497 17.8848 22.0049 18.7479C21.8611 19.61 21.8812 20.1316 21.1377 20.6005C20.9984 20.6882 20.8633 20.7372 20.7295 20.7577C20.6402 20.7714 20.5516 20.7722 20.4629 20.7645C20.0188 20.7261 19.5717 20.4632 19.0273 20.4022C18.973 20.3961 18.9177 20.3912 18.8613 20.3895L18.8604 20.3915C17.9569 20.3655 17.3057 21.0253 17.3057 21.0253L12.7021 25.6444V22.5526C12.7022 22.1746 12.8523 21.8117 13.1201 21.5438L26.749 7.92078C26.7832 7.88666 26.8233 7.8672 26.8643 7.86023C26.9049 7.85331 26.9462 7.85839 26.9834 7.8739ZM26.9277 2.16785C27.0288 2.17959 27.1201 2.2615 27.1201 2.38172V5.4989H27.1211L12.7021 19.9501V16.8651C12.7021 16.4872 12.8523 16.1242 13.1201 15.8563L26.752 2.22937C26.8026 2.17876 26.8671 2.16081 26.9277 2.16785Z" fill="#1C1B1C"/>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
assets/images/contact.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -0,0 +1,6 @@
<svg width="45" height="46" viewBox="0 0 45 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="22.5" cy="23" r="22.5" fill="#312938" fill-opacity="0.1"/>
<path d="M25.391 19.4402C24.7502 15.2551 21.1352 12.0498 16.7708 12.0498C11.9548 12.0498 8.04984 15.9548 8.04984 20.7708C8.04984 24.1914 10.0183 27.1505 12.8847 28.5797C13.9003 29.087 15.0296 29.401 16.2246 29.4738C16.405 29.4857 16.5874 29.4917 16.7708 29.4917C20.8542 29.4917 24.2807 26.686 25.2306 22.8977C25.401 22.2169 25.4917 21.5043 25.4917 20.7708C25.4917 20.3183 25.4568 19.8738 25.391 19.4402ZM16.7708 26.5017C16.4518 26.5017 16.1379 26.4757 15.8329 26.4249C14.7794 26.2505 13.8226 25.788 13.0452 25.1223C11.8183 24.0708 11.0399 22.51 11.0399 20.7708C11.0399 17.6113 13.6113 15.0399 16.7708 15.0399C19.1429 15.0399 21.1821 16.488 22.0512 18.5462C22.3412 19.2309 22.5017 19.9824 22.5017 20.7708C22.5017 21.0508 22.4817 21.3259 22.4429 21.595C22.0422 24.3658 19.6512 26.5017 16.7708 26.5017Z" fill="#312938"/>
<path d="M36.4551 15.7874H34.2126V13.5448C34.2126 12.7196 33.5429 12.0498 32.7176 12.0498C31.8924 12.0498 31.2226 12.7196 31.2226 13.5448V15.7874H28.9801C28.1548 15.7874 27.485 16.4571 27.485 17.2824C27.485 18.1076 28.1548 18.7774 28.9801 18.7774H31.2226V21.0199C31.2226 21.8452 31.8924 22.5149 32.7176 22.5149C33.5429 22.5149 34.2126 21.8452 34.2126 21.0199V18.7774H36.4551C37.2804 18.7774 37.9502 18.1076 37.9502 17.2824C37.9502 16.4571 37.2804 15.7874 36.4551 15.7874Z" fill="#312938"/>
<path d="M25.391 19.4402C25.4568 19.8738 25.4917 20.3183 25.4917 20.7708C25.4917 21.5043 25.401 22.2169 25.2306 22.8977C26.4575 23.9502 27.2359 25.511 27.2359 27.2492C27.2359 30.4096 24.6654 32.9801 21.505 32.9801C19.1339 32.9801 17.0937 31.5319 16.2246 29.4738C15.0296 29.401 13.9003 29.087 12.8847 28.5797C13.5256 32.7658 17.1415 35.9701 21.505 35.9701C26.3219 35.9701 30.2259 32.0661 30.2259 27.2492C30.2259 23.8296 28.2575 20.8684 25.391 19.4402Z" fill="#312938"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

3
assets/images/menu.svg Normal file
View file

@ -0,0 +1,3 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21 17V19H1V17H21ZM21 12H1V10H21V12ZM21 5H1V3H21V5Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 180 B

View file

@ -1,69 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="510px"
height="510px"
viewBox="0 0 510 510"
style="enable-background:new 0 0 510 510;"
xml:space="preserve"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="notification_logo_tilt_white.svg"><metadata
id="metadata42"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs40" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1090"
id="namedview38"
showgrid="false"
inkscape:zoom="0.4627451"
inkscape:cx="-849.27966"
inkscape:cy="255"
inkscape:window-x="-12"
inkscape:window-y="58"
inkscape:window-maximized="1"
inkscape:current-layer="notifications"
inkscape:object-paths="true" /><g
id="g3"
transform="matrix(0.87658593,0,0,0.87658593,31.470588,31.470588)"><g
id="notifications"
transform="rotate(-20,255,255)"><path
d="m 233.56017,502.19654 c 28.05,0 51,-22.95 51,-51 h -102 c 0,28.05 22.95,51 51,51 z m 165.75,-153 v -140.25 c 0,-79.05 -53.55,-142.8 -127.5,-160.65 v -17.85 c 0,-20.4 -17.85,-38.2499996 -38.25,-38.2499996 -20.4,0 -38.25,17.8499996 -38.25,38.2499996 v 17.85 c -73.95,17.85 -127.499999,81.6 -127.499999,160.65 v 140.25 l -51,51 v 25.5 H 450.31017 v -25.5 z"
id="path6"
inkscape:connector-curvature="0"
style="opacity:1;fill:#ffffff;fill-opacity:0;stroke:#000000;stroke-width:19.39342117;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g></g><g
id="g8" /><g
id="g10" /><g
id="g12" /><g
id="g14" /><g
id="g16" /><g
id="g18" /><g
id="g20" /><g
id="g22" /><g
id="g24" /><g
id="g26" /><g
id="g28" /><g
id="g30" /><g
id="g32" /><g
id="g34" /><g
id="g36" /></svg>
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.7842 18.8721C13.7841 20.5907 12.4091 22 10.6904 22C8.97183 21.9999 7.56261 20.5907 7.5625 18.8721C7.5625 18.7347 7.56238 18.6314 7.59668 18.5283H0V15.7783H2.40625V8.59375C2.40625 3.85 6.25625 0 11 0C15.7437 0 19.5938 3.85 19.5938 8.59375V15.7783H22V18.5283H13.7842V18.8721ZM11 2.75C7.76875 2.75 5.15625 5.3625 5.15625 8.59375V15.7783H16.8438V8.59375C16.8438 5.3625 14.2312 2.75 11 2.75Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 519 B

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
assets/images/receive.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View file

@ -0,0 +1,86 @@
<svg width="260" height="298" viewBox="0 0 260 298" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M119.655 6.27832C126.055 3.53578 133.272 3.45033 139.723 6.02148L140.345 6.27832L243.044 50.293C252.699 54.431 258.96 63.925 258.96 74.4297V128.542C258.96 175.815 236.309 220.2 198.085 247.94L197.18 248.593L145.264 285.676C136.276 292.096 124.25 292.197 115.167 285.978L114.736 285.676L62.8203 248.593C24.0499 220.899 1.04004 176.187 1.04004 128.542V74.4297C1.04004 64.0891 7.10644 54.7283 16.5059 50.4912L16.9561 50.293L119.655 6.27832Z" stroke="#708BF4" stroke-opacity="0.05" stroke-width="2.08"/>
<path d="M120.451 17.2793C126.358 14.7477 133.02 14.6687 138.975 17.042L139.549 17.2793L234.349 57.9082C243.261 61.7279 249.04 70.491 249.04 80.1875V130.138C249.04 173.775 228.131 214.745 192.848 240.352L192.012 240.954L144.089 275.185C135.792 281.111 124.692 281.204 116.308 275.463L115.911 275.185L67.9883 240.954C32.2001 215.391 10.96 174.118 10.96 130.138V80.1875C10.9601 70.6424 16.56 62.0019 25.2363 58.0908L25.6514 57.9082L120.451 17.2793Z" stroke="#708BF4" stroke-opacity="0.15" stroke-width="1.92"/>
<path d="M121.294 28.3906C126.68 26.0825 132.754 26.0099 138.183 28.1738L138.706 28.3906L225.605 65.6328C233.731 69.1153 239 77.1057 239 85.9463V131.733C239 171.381 220.152 208.625 188.301 232.109L186.774 233.218L142.846 264.596C135.282 269.999 125.161 270.083 117.517 264.849L117.154 264.596L73.2256 233.218C40.4513 209.807 21 172.01 21 131.733V85.9463C21 77.2438 26.1053 69.3657 34.0156 65.7998L34.3945 65.6328L121.294 28.3906Z" stroke="#708BF4" stroke-opacity="0.5" stroke-width="2"/>
<path d="M77.8584 226.327L117.794 254.853C125.096 260.068 134.904 260.068 142.206 254.853L182.141 226.327C212.176 204.874 230 170.238 230 133.329V91.7045C230 83.3039 224.994 75.7116 217.272 72.4024L138.272 38.5453C132.99 36.2813 127.01 36.2813 121.728 38.5453L42.7277 72.4024C35.0063 75.7116 30 83.3039 30 91.7045V133.329C30 170.238 47.8247 204.874 77.8584 226.327Z" fill="black"/>
<path d="M77.8584 226.327L117.794 254.853C125.096 260.068 134.904 260.068 142.206 254.853L182.141 226.327C212.176 204.874 230 170.238 230 133.329V91.7045C230 83.3039 224.994 75.7116 217.272 72.4024L138.272 38.5453C132.99 36.2813 127.01 36.2813 121.728 38.5453L42.7277 72.4024C35.0063 75.7116 30 83.3039 30 91.7045V133.329C30 170.238 47.8247 204.874 77.8584 226.327Z" fill="url(#paint0_linear_4659_24215)"/>
<path d="M123.479 42.6299C127.513 40.9009 132.063 40.8476 136.13 42.4688L136.521 42.6299L215.521 76.4873C221.609 79.0961 225.556 85.0816 225.556 91.7041V133.329C225.556 168.248 208.955 201.051 180.902 221.734L179.559 222.711L139.623 251.236C134.047 255.22 126.615 255.344 120.923 251.609L120.377 251.236L80.4414 222.711C51.5757 202.092 34.4443 168.802 34.4443 133.329V91.7041C34.4445 85.2886 38.1486 79.4713 43.9141 76.7422L44.4785 76.4873L123.479 42.6299Z" stroke="url(#paint1_linear_4659_24215)" stroke-width="8.88889"/>
<path d="M123.479 42.6299C127.513 40.9009 132.063 40.8476 136.13 42.4688L136.521 42.6299L215.521 76.4873C221.609 79.0961 225.556 85.0816 225.556 91.7041V133.329C225.556 168.248 208.955 201.051 180.902 221.734L179.559 222.711L139.623 251.236C134.047 255.22 126.615 255.344 120.923 251.609L120.377 251.236L80.4414 222.711C51.5757 202.092 34.4443 168.802 34.4443 133.329V91.7041C34.4445 85.2886 38.1486 79.4713 43.9141 76.7422L44.4785 76.4873L123.479 42.6299Z" stroke="url(#paint2_linear_4659_24215)" stroke-width="8.88889"/>
<path d="M123.479 42.6299C127.513 40.9009 132.063 40.8476 136.13 42.4688L136.521 42.6299L215.521 76.4873C221.609 79.0961 225.556 85.0816 225.556 91.7041V133.329C225.556 168.248 208.955 201.051 180.902 221.734L179.559 222.711L139.623 251.236C134.047 255.22 126.615 255.344 120.923 251.609L120.377 251.236L80.4414 222.711C51.5757 202.092 34.4443 168.802 34.4443 133.329V91.7041C34.4445 85.2886 38.1486 79.4713 43.9141 76.7422L44.4785 76.4873L123.479 42.6299Z" stroke="url(#paint3_linear_4659_24215)" stroke-width="8.88889"/>
<g filter="url(#filter0_i_4659_24215)">
<path d="M77.8584 226.327L117.794 254.853C125.096 260.068 134.904 260.068 142.206 254.853L182.141 226.327C212.176 204.874 230 170.238 230 133.329V91.7045C230 83.3039 224.994 75.7116 217.272 72.4024L138.272 38.5453C132.99 36.2813 127.01 36.2813 121.728 38.5453L42.7277 72.4024C35.0063 75.7116 30 83.3039 30 91.7045V133.329C30 170.238 47.8247 204.874 77.8584 226.327Z" fill="black" fill-opacity="0.01"/>
</g>
<g filter="url(#filter1_ii_4659_24215)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M147.625 154.25C163.158 154.25 175.75 141.658 175.75 126.125C175.75 110.592 163.158 98 147.625 98C132.092 98 119.5 110.592 119.5 126.125C119.5 131.628 121.081 136.763 123.813 141.098L85.6611 179.25L104.393 197.982L113.232 189.143L103.339 179.25L113.25 169.339L123.143 179.232L131.982 170.393L122.089 160.5L132.652 149.937C136.987 152.669 142.122 154.25 147.625 154.25ZM147.625 141.75C156.254 141.75 163.25 134.754 163.25 126.125C163.25 117.496 156.254 110.5 147.625 110.5C138.996 110.5 132 117.496 132 126.125C132 134.754 138.996 141.75 147.625 141.75Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M147.625 154.25C163.158 154.25 175.75 141.658 175.75 126.125C175.75 110.592 163.158 98 147.625 98C132.092 98 119.5 110.592 119.5 126.125C119.5 131.628 121.081 136.763 123.813 141.098L85.6611 179.25L104.393 197.982L113.232 189.143L103.339 179.25L113.25 169.339L123.143 179.232L131.982 170.393L122.089 160.5L132.652 149.937C136.987 152.669 142.122 154.25 147.625 154.25ZM147.625 141.75C156.254 141.75 163.25 134.754 163.25 126.125C163.25 117.496 156.254 110.5 147.625 110.5C138.996 110.5 132 117.496 132 126.125C132 134.754 138.996 141.75 147.625 141.75Z" fill="url(#paint4_linear_4659_24215)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M147.625 154.25C163.158 154.25 175.75 141.658 175.75 126.125C175.75 110.592 163.158 98 147.625 98C132.092 98 119.5 110.592 119.5 126.125C119.5 131.628 121.081 136.763 123.813 141.098L85.6611 179.25L104.393 197.982L113.232 189.143L103.339 179.25L113.25 169.339L123.143 179.232L131.982 170.393L122.089 160.5L132.652 149.937C136.987 152.669 142.122 154.25 147.625 154.25ZM147.625 141.75C156.254 141.75 163.25 134.754 163.25 126.125C163.25 117.496 156.254 110.5 147.625 110.5C138.996 110.5 132 117.496 132 126.125C132 134.754 138.996 141.75 147.625 141.75Z" fill="url(#paint5_linear_4659_24215)"/>
</g>
<path d="M158.882 230.082H221.118C227.963 230.082 232.227 222.658 228.779 216.746L197.66 163.4C194.238 157.533 185.762 157.533 182.34 163.4L151.221 216.746C147.773 222.658 152.037 230.082 158.882 230.082Z" fill="#D9D9D9"/>
<path d="M158.882 230.082H221.118C227.963 230.082 232.227 222.658 228.779 216.746L197.66 163.4C194.238 157.533 185.762 157.533 182.34 163.4L151.221 216.746C147.773 222.658 152.037 230.082 158.882 230.082Z" fill="url(#paint6_linear_4659_24215)"/>
<path d="M158.882 230.082H221.118C227.963 230.082 232.227 222.658 228.779 216.746L197.66 163.4C194.238 157.533 185.762 157.533 182.34 163.4L151.221 216.746C147.773 222.658 152.037 230.082 158.882 230.082Z" stroke="#312938" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M158.882 230.082H221.118C227.963 230.082 232.227 222.658 228.779 216.746L197.66 163.4C194.238 157.533 185.762 157.533 182.34 163.4L151.221 216.746C147.773 222.658 152.037 230.082 158.882 230.082Z" stroke="url(#paint7_linear_4659_24215)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M158.882 230.082H221.118C227.963 230.082 232.227 222.658 228.779 216.746L197.66 163.4C194.238 157.533 185.762 157.533 182.34 163.4L151.221 216.746C147.773 222.658 152.037 230.082 158.882 230.082Z" stroke="url(#paint8_linear_4659_24215)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M189.907 212.209H189.952M189.907 198.907V185.604" stroke="#312938" stroke-width="8.86825" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<filter id="filter0_i_4659_24215" x="30" y="36.8477" width="200" height="221.917" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/>
<feBlend mode="plus-lighter" in2="shape" result="effect1_innerShadow_4659_24215"/>
</filter>
<filter id="filter1_ii_4659_24215" x="85.6611" y="98" width="90.0889" height="99.9814" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_4659_24215"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="-2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
<feBlend mode="normal" in2="effect1_innerShadow_4659_24215" result="effect2_innerShadow_4659_24215"/>
</filter>
<linearGradient id="paint0_linear_4659_24215" x1="130" y1="35" x2="130" y2="263.571" gradientUnits="userSpaceOnUse">
<stop stop-color="#19233C"/>
<stop offset="1" stop-color="#1647C3"/>
</linearGradient>
<linearGradient id="paint1_linear_4659_24215" x1="130" y1="35" x2="130" y2="263.571" gradientUnits="userSpaceOnUse">
<stop stop-color="#C1F2FF"/>
<stop offset="0.42" stop-color="#2077F8"/>
<stop offset="0.700262" stop-color="#000F4D"/>
</linearGradient>
<linearGradient id="paint2_linear_4659_24215" x1="130" y1="35" x2="130" y2="263.571" gradientUnits="userSpaceOnUse">
<stop stop-color="#C1F2FF"/>
<stop offset="0.700262" stop-color="#718CF5"/>
</linearGradient>
<linearGradient id="paint3_linear_4659_24215" x1="130" y1="35" x2="130" y2="263.571" gradientUnits="userSpaceOnUse">
<stop stop-color="#D8E3FF"/>
<stop offset="0.700262" stop-color="#718CF5"/>
</linearGradient>
<linearGradient id="paint4_linear_4659_24215" x1="130.705" y1="98" x2="130.705" y2="197.982" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#6DA8FF"/>
</linearGradient>
<linearGradient id="paint5_linear_4659_24215" x1="130.705" y1="98" x2="130.705" y2="197.982" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#6891FE"/>
</linearGradient>
<linearGradient id="paint6_linear_4659_24215" x1="190" y1="159" x2="190.533" y2="242.2" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFC414"/>
<stop offset="1" stop-color="#FF9500"/>
</linearGradient>
<linearGradient id="paint7_linear_4659_24215" x1="190" y1="159" x2="190" y2="230.082" gradientUnits="userSpaceOnUse">
<stop stop-color="#5C486E"/>
<stop offset="1" stop-color="#312938"/>
</linearGradient>
<linearGradient id="paint8_linear_4659_24215" x1="190" y1="159" x2="190" y2="230.082" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#EBD4FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,111 @@
<svg width="260" height="298" viewBox="0 0 260 298" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M119.655 6.2793C126.055 3.53675 133.272 3.4513 139.723 6.02246L140.345 6.2793L243.044 50.2939C252.699 54.432 258.96 63.9259 258.96 74.4307V128.543C258.96 175.816 236.309 220.201 198.085 247.941L197.18 248.594L145.264 285.677C136.276 292.097 124.25 292.198 115.167 285.979L114.736 285.677L62.8203 248.594C24.0499 220.9 1.04004 176.188 1.04004 128.543V74.4307C1.04004 64.09 7.10644 54.7293 16.5059 50.4922L16.9561 50.2939L119.655 6.2793Z" stroke="#4A98DC" stroke-opacity="0.05" stroke-width="2.08"/>
<path d="M120.451 17.2803C126.358 14.7487 133.02 14.6696 138.975 17.043L139.549 17.2803L234.349 57.9092C243.261 61.7289 249.04 70.492 249.04 80.1885V130.139C249.04 173.775 228.131 214.746 192.848 240.353L192.012 240.955L144.089 275.186C135.792 281.112 124.692 281.205 116.308 275.464L115.911 275.186L67.9883 240.955C32.2001 215.392 10.96 174.119 10.96 130.139V80.1885C10.9601 70.6434 16.56 62.0028 25.2363 58.0918L25.6514 57.9092L120.451 17.2803Z" stroke="#4B98DC" stroke-opacity="0.15" stroke-width="1.92"/>
<path d="M121.294 28.3916C126.68 26.0835 132.754 26.0109 138.183 28.1748L138.706 28.3916L225.605 65.6338C233.731 69.1163 239 77.1066 239 85.9473V131.734C239 171.382 220.152 208.626 188.301 232.11L186.774 233.219L142.846 264.597C135.282 270 125.161 270.084 117.517 264.85L117.154 264.597L73.2256 233.219C40.4513 209.808 21 172.011 21 131.734V85.9473C21 77.2448 26.1053 69.3666 34.0156 65.8008L34.3945 65.6338L121.294 28.3916Z" stroke="#4895DB" stroke-opacity="0.35" stroke-width="2"/>
<path d="M77.8584 226.328L117.794 254.854C125.096 260.069 134.904 260.069 142.206 254.854L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7054C230 83.3049 224.994 75.7126 217.272 72.4034L138.272 38.5462C132.99 36.2823 127.01 36.2823 121.728 38.5463L42.7277 72.4034C35.0063 75.7126 30 83.3049 30 91.7054V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="black"/>
<path d="M77.8584 226.328L117.794 254.854C125.096 260.069 134.904 260.069 142.206 254.854L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7054C230 83.3049 224.994 75.7126 217.272 72.4034L138.272 38.5462C132.99 36.2823 127.01 36.2823 121.728 38.5463L42.7277 72.4034C35.0063 75.7126 30 83.3049 30 91.7054V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="url(#paint0_linear_5093_13165)"/>
<path d="M77.8584 226.328L117.794 254.854C125.096 260.069 134.904 260.069 142.206 254.854L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7054C230 83.3049 224.994 75.7126 217.272 72.4034L138.272 38.5462C132.99 36.2823 127.01 36.2823 121.728 38.5463L42.7277 72.4034C35.0063 75.7126 30 83.3049 30 91.7054V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="url(#paint1_linear_5093_13165)"/>
<path d="M77.8584 226.328L117.794 254.854C125.096 260.069 134.904 260.069 142.206 254.854L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7054C230 83.3049 224.994 75.7126 217.272 72.4034L138.272 38.5462C132.99 36.2823 127.01 36.2823 121.728 38.5463L42.7277 72.4034C35.0063 75.7126 30 83.3049 30 91.7054V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="url(#paint2_linear_5093_13165)"/>
<path d="M77.8584 226.328L117.794 254.854C125.096 260.069 134.904 260.069 142.206 254.854L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7054C230 83.3049 224.994 75.7126 217.272 72.4034L138.272 38.5462C132.99 36.2823 127.01 36.2823 121.728 38.5463L42.7277 72.4034C35.0063 75.7126 30 83.3049 30 91.7054V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="url(#paint3_linear_5093_13165)"/>
<path d="M77.8584 226.328L117.794 254.854C125.096 260.069 134.904 260.069 142.206 254.854L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7054C230 83.3049 224.994 75.7126 217.272 72.4034L138.272 38.5462C132.99 36.2823 127.01 36.2823 121.728 38.5463L42.7277 72.4034C35.0063 75.7126 30 83.3049 30 91.7054V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="url(#paint4_radial_5093_13165)" fill-opacity="0.3"/>
<path d="M123.479 42.6309C127.513 40.9019 132.063 40.8486 136.13 42.4697L136.521 42.6309L215.521 76.4883C221.609 79.097 225.556 85.0825 225.556 91.7051V133.33C225.556 168.249 208.955 201.052 180.902 221.735L179.559 222.712L139.623 251.237C134.047 255.221 126.615 255.345 120.923 251.61L120.377 251.237L80.4414 222.712C51.5757 202.093 34.4443 168.803 34.4443 133.33V91.7051C34.4445 85.2895 38.1486 79.4723 43.9141 76.7432L44.4785 76.4883L123.479 42.6309Z" stroke="url(#paint5_linear_5093_13165)" stroke-width="8.88889"/>
<path d="M123.479 42.6309C127.513 40.9019 132.063 40.8486 136.13 42.4697L136.521 42.6309L215.521 76.4883C221.609 79.097 225.556 85.0825 225.556 91.7051V133.33C225.556 168.249 208.955 201.052 180.902 221.735L179.559 222.712L139.623 251.237C134.047 255.221 126.615 255.345 120.923 251.61L120.377 251.237L80.4414 222.712C51.5757 202.093 34.4443 168.803 34.4443 133.33V91.7051C34.4445 85.2895 38.1486 79.4723 43.9141 76.7432L44.4785 76.4883L123.479 42.6309Z" stroke="url(#paint6_linear_5093_13165)" stroke-width="8.88889"/>
<path d="M123.479 42.6309C127.513 40.9019 132.063 40.8486 136.13 42.4697L136.521 42.6309L215.521 76.4883C221.609 79.097 225.556 85.0825 225.556 91.7051V133.33C225.556 168.249 208.955 201.052 180.902 221.735L179.559 222.712L139.623 251.237C134.047 255.221 126.615 255.345 120.923 251.61L120.377 251.237L80.4414 222.712C51.5757 202.093 34.4443 168.803 34.4443 133.33V91.7051C34.4445 85.2895 38.1486 79.4723 43.9141 76.7432L44.4785 76.4883L123.479 42.6309Z" stroke="url(#paint7_linear_5093_13165)" stroke-width="8.88889"/>
<path d="M123.479 42.6309C127.513 40.9019 132.063 40.8486 136.13 42.4697L136.521 42.6309L215.521 76.4883C221.609 79.097 225.556 85.0825 225.556 91.7051V133.33C225.556 168.249 208.955 201.052 180.902 221.735L179.559 222.712L139.623 251.237C134.047 255.221 126.615 255.345 120.923 251.61L120.377 251.237L80.4414 222.712C51.5757 202.093 34.4443 168.803 34.4443 133.33V91.7051C34.4445 85.2895 38.1486 79.4723 43.9141 76.7432L44.4785 76.4883L123.479 42.6309Z" stroke="url(#paint8_linear_5093_13165)" stroke-width="8.88889"/>
<g filter="url(#filter0_i_5093_13165)">
<path d="M77.8584 226.328L117.794 254.854C125.096 260.069 134.904 260.069 142.206 254.854L182.141 226.328C212.176 204.875 230 170.239 230 133.33V91.7054C230 83.3049 224.994 75.7126 217.272 72.4034L138.272 38.5462C132.99 36.2823 127.01 36.2823 121.728 38.5463L42.7277 72.4034C35.0063 75.7126 30 83.3049 30 91.7054V133.33C30 170.239 47.8247 204.875 77.8584 226.328Z" fill="black" fill-opacity="0.01"/>
</g>
<g filter="url(#filter1_ii_5093_13165)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M147.625 154.251C163.158 154.251 175.75 141.659 175.75 126.126C175.75 110.593 163.158 98.001 147.625 98.001C132.092 98.001 119.5 110.593 119.5 126.126C119.5 131.629 121.081 136.764 123.813 141.099L85.6611 179.251L104.393 197.983L113.232 189.144L103.339 179.251L113.25 169.34L123.143 179.233L131.982 170.394L122.089 160.501L132.652 149.938C136.987 152.67 142.122 154.251 147.625 154.251ZM147.625 141.751C156.254 141.751 163.25 134.755 163.25 126.126C163.25 117.497 156.254 110.501 147.625 110.501C138.996 110.501 132 117.497 132 126.126C132 134.755 138.996 141.751 147.625 141.751Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M147.625 154.251C163.158 154.251 175.75 141.659 175.75 126.126C175.75 110.593 163.158 98.001 147.625 98.001C132.092 98.001 119.5 110.593 119.5 126.126C119.5 131.629 121.081 136.764 123.813 141.099L85.6611 179.251L104.393 197.983L113.232 189.144L103.339 179.251L113.25 169.34L123.143 179.233L131.982 170.394L122.089 160.501L132.652 149.938C136.987 152.67 142.122 154.251 147.625 154.251ZM147.625 141.751C156.254 141.751 163.25 134.755 163.25 126.126C163.25 117.497 156.254 110.501 147.625 110.501C138.996 110.501 132 117.497 132 126.126C132 134.755 138.996 141.751 147.625 141.751Z" fill="url(#paint9_linear_5093_13165)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M147.625 154.251C163.158 154.251 175.75 141.659 175.75 126.126C175.75 110.593 163.158 98.001 147.625 98.001C132.092 98.001 119.5 110.593 119.5 126.126C119.5 131.629 121.081 136.764 123.813 141.099L85.6611 179.251L104.393 197.983L113.232 189.144L103.339 179.251L113.25 169.34L123.143 179.233L131.982 170.394L122.089 160.501L132.652 149.938C136.987 152.67 142.122 154.251 147.625 154.251ZM147.625 141.751C156.254 141.751 163.25 134.755 163.25 126.126C163.25 117.497 156.254 110.501 147.625 110.501C138.996 110.501 132 117.497 132 126.126C132 134.755 138.996 141.751 147.625 141.751Z" fill="url(#paint10_linear_5093_13165)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M147.625 154.251C163.158 154.251 175.75 141.659 175.75 126.126C175.75 110.593 163.158 98.001 147.625 98.001C132.092 98.001 119.5 110.593 119.5 126.126C119.5 131.629 121.081 136.764 123.813 141.099L85.6611 179.251L104.393 197.983L113.232 189.144L103.339 179.251L113.25 169.34L123.143 179.233L131.982 170.394L122.089 160.501L132.652 149.938C136.987 152.67 142.122 154.251 147.625 154.251ZM147.625 141.751C156.254 141.751 163.25 134.755 163.25 126.126C163.25 117.497 156.254 110.501 147.625 110.501C138.996 110.501 132 117.497 132 126.126C132 134.755 138.996 141.751 147.625 141.751Z" fill="url(#paint11_linear_5093_13165)"/>
</g>
<path d="M158.882 230.082H221.118C227.963 230.082 232.227 222.658 228.779 216.746L197.66 163.4C194.238 157.533 185.762 157.533 182.34 163.4L151.221 216.746C147.773 222.658 152.037 230.082 158.882 230.082Z" fill="#D9D9D9"/>
<path d="M158.882 230.082H221.118C227.963 230.082 232.227 222.658 228.779 216.746L197.66 163.4C194.238 157.533 185.762 157.533 182.34 163.4L151.221 216.746C147.773 222.658 152.037 230.082 158.882 230.082Z" fill="url(#paint12_linear_5093_13165)"/>
<path d="M158.882 230.082H221.118C227.963 230.082 232.227 222.658 228.779 216.746L197.66 163.4C194.238 157.533 185.762 157.533 182.34 163.4L151.221 216.746C147.773 222.658 152.037 230.082 158.882 230.082Z" stroke="#312938" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M158.882 230.082H221.118C227.963 230.082 232.227 222.658 228.779 216.746L197.66 163.4C194.238 157.533 185.762 157.533 182.34 163.4L151.221 216.746C147.773 222.658 152.037 230.082 158.882 230.082Z" stroke="url(#paint13_linear_5093_13165)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M189.907 212.209H189.952M189.907 198.907V185.604" stroke="#312938" stroke-width="8.86825" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<filter id="filter0_i_5093_13165" x="30" y="36.8486" width="200" height="221.917" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_5093_13165"/>
</filter>
<filter id="filter1_ii_5093_13165" x="85.6611" y="98.001" width="90.0889" height="99.9814" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.3 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_5093_13165"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="-2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
<feBlend mode="normal" in2="effect1_innerShadow_5093_13165" result="effect2_innerShadow_5093_13165"/>
</filter>
<linearGradient id="paint0_linear_5093_13165" x1="130" y1="35.001" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#002A52"/>
<stop offset="1" stop-color="#0652DF"/>
</linearGradient>
<linearGradient id="paint1_linear_5093_13165" x1="130" y1="35.001" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#19233C"/>
<stop offset="1" stop-color="#144CD8"/>
</linearGradient>
<linearGradient id="paint2_linear_5093_13165" x1="130" y1="35.001" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#19233C"/>
<stop offset="1" stop-color="#1647C3"/>
</linearGradient>
<linearGradient id="paint3_linear_5093_13165" x1="130" y1="35.001" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#FAFAFA"/>
<stop offset="1" stop-color="#72AAFF"/>
</linearGradient>
<radialGradient id="paint4_radial_5093_13165" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(130 149.287) rotate(90) scale(97.381 85.2083)">
<stop stop-color="white"/>
<stop offset="1" stop-color="white" stop-opacity="0"/>
</radialGradient>
<linearGradient id="paint5_linear_5093_13165" x1="130" y1="35.001" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#C1F2FF"/>
<stop offset="0.42" stop-color="#2077F8"/>
<stop offset="0.700262" stop-color="#000F4D"/>
</linearGradient>
<linearGradient id="paint6_linear_5093_13165" x1="130" y1="35.001" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#C1F2FF"/>
<stop offset="0.700262" stop-color="#718CF5"/>
</linearGradient>
<linearGradient id="paint7_linear_5093_13165" x1="130" y1="35.001" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#D8E3FF"/>
<stop offset="0.700262" stop-color="#718CF5"/>
</linearGradient>
<linearGradient id="paint8_linear_5093_13165" x1="130" y1="35.001" x2="130" y2="263.572" gradientUnits="userSpaceOnUse">
<stop stop-color="#68BEEF"/>
<stop offset="0.700262" stop-color="#2C71CC"/>
</linearGradient>
<linearGradient id="paint9_linear_5093_13165" x1="130.705" y1="98.001" x2="130.705" y2="197.983" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#6DA8FF"/>
</linearGradient>
<linearGradient id="paint10_linear_5093_13165" x1="130.705" y1="98.001" x2="130.705" y2="197.983" gradientUnits="userSpaceOnUse">
<stop stop-color="#68BEEF"/>
<stop offset="1" stop-color="#0047A3"/>
</linearGradient>
<linearGradient id="paint11_linear_5093_13165" x1="130.705" y1="98.001" x2="130.705" y2="197.983" gradientUnits="userSpaceOnUse">
<stop stop-color="#68BEEF"/>
<stop offset="0.700262" stop-color="#2C71CC"/>
</linearGradient>
<linearGradient id="paint12_linear_5093_13165" x1="190" y1="159" x2="190.533" y2="242.2" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFC414"/>
<stop offset="1" stop-color="#FF9500"/>
</linearGradient>
<linearGradient id="paint13_linear_5093_13165" x1="190" y1="159" x2="190" y2="230.082" gradientUnits="userSpaceOnUse">
<stop stop-color="#5C486E"/>
<stop offset="1" stop-color="#312938"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

BIN
assets/images/send2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/images/swap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

BIN
assets/images/wallets.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

View file

@ -0,0 +1,215 @@
<svg width="375" height="304" viewBox="0 0 375 304" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="-40" width="475" height="304" fill="url(#paint0_linear_4656_21674)"/>
<g filter="url(#filter0_df_4656_21674)">
<circle cx="298.5" cy="121.5" r="2.5" fill="#E0E7FA"/>
</g>
<g opacity="0.5" filter="url(#filter1_df_4656_21674)">
<ellipse cx="261" cy="64.5" rx="1" ry="2.5" fill="#E0E7FA"/>
</g>
<g filter="url(#filter2_df_4656_21674)">
<path d="M95.5 59L96.3061 65.6939L103 66.5L96.3061 67.3061L95.5 74L94.6939 67.3061L88 66.5L94.6939 65.6939L95.5 59Z" fill="#D7E2F7"/>
</g>
<g filter="url(#filter3_df_4656_21674)">
<path d="M38.5 156L39.3061 162.694L46 163.5L39.3061 164.306L38.5 171L37.6939 164.306L31 163.5L37.6939 162.694L38.5 156Z" fill="#D7E2F7"/>
</g>
<g filter="url(#filter4_df_4656_21674)">
<path d="M336.5 79L337.306 85.6939L344 86.5L337.306 87.3061L336.5 94L335.694 87.3061L329 86.5L335.694 85.6939L336.5 79Z" fill="#D7E2F7"/>
</g>
<g filter="url(#filter5_df_4656_21674)">
<path d="M75.5 123.5L76.1449 128.855L81.5 129.5L76.1449 130.145L75.5 135.5L74.8551 130.145L69.5 129.5L74.8551 128.855L75.5 123.5Z" fill="#D7E2F7"/>
</g>
<g filter="url(#filter6_df_4656_21674)">
<circle cx="271.5" cy="216.5" r="2.5" fill="#E0E7FA"/>
</g>
<g filter="url(#filter7_df_4656_21674)">
<path d="M316.5 171L317.844 182.156L329 183.5L317.844 184.844L316.5 196L315.156 184.844L304 183.5L315.156 182.156L316.5 171Z" fill="#D7E2F7"/>
</g>
<line x1="316.5" y1="161" x2="316.5" y2="207" stroke="url(#paint1_linear_4656_21674)"/>
<line x1="293" y1="183.5" x2="339" y2="183.5" stroke="url(#paint2_linear_4656_21674)"/>
<g opacity="0.2">
<g filter="url(#filter8_df_4656_21674)">
<path d="M54.5 77L55.8435 88.1565L67 89.5L55.8435 90.8435L54.5 102L53.1565 90.8435L42 89.5L53.1565 88.1565L54.5 77Z" fill="#D7E2F7"/>
</g>
<line x1="54.5" y1="67" x2="54.5" y2="113" stroke="url(#paint3_linear_4656_21674)"/>
<line x1="31" y1="89.5" x2="77" y2="89.5" stroke="url(#paint4_linear_4656_21674)"/>
</g>
<g opacity="0.5" filter="url(#filter9_df_4656_21674)">
<ellipse cx="102" cy="173.5" rx="1" ry="2.5" fill="#E0E7FA"/>
</g>
<path d="M176.165 126.986C174.967 129.623 174.3 132.551 174.3 135.636C174.3 147.197 183.672 156.569 195.232 156.569C200.746 156.569 205.761 154.436 209.5 150.951C206.208 158.196 198.909 163.235 190.433 163.235C178.872 163.235 169.5 153.863 169.5 142.302C169.5 136.255 172.065 130.808 176.165 126.986Z" fill="#D9D9D9"/>
<path d="M176.165 126.986C174.967 129.623 174.3 132.551 174.3 135.636C174.3 147.197 183.672 156.569 195.232 156.569C200.746 156.569 205.761 154.436 209.5 150.951C206.208 158.196 198.909 163.235 190.433 163.235C178.872 163.235 169.5 153.863 169.5 142.302C169.5 136.255 172.065 130.808 176.165 126.986Z" fill="url(#paint5_linear_4656_21674)"/>
<path d="M176.165 126.986C174.967 129.623 174.3 132.551 174.3 135.636C174.3 147.197 183.672 156.569 195.232 156.569C200.746 156.569 205.761 154.436 209.5 150.951C206.208 158.196 198.909 163.235 190.433 163.235C178.872 163.235 169.5 153.863 169.5 142.302C169.5 136.255 172.065 130.808 176.165 126.986Z" fill="url(#paint6_linear_4656_21674)"/>
<g opacity="0.5" filter="url(#filter10_f_4656_21674)">
<path d="M176.165 126.986C174.967 129.623 174.3 132.551 174.3 135.636C174.3 147.197 183.672 156.569 195.232 156.569C200.746 156.569 205.761 154.436 209.5 150.951C206.208 158.196 198.909 163.235 190.433 163.235C178.872 163.235 169.5 153.863 169.5 142.302C169.5 136.255 172.065 130.808 176.165 126.986Z" fill="#D9D9D9"/>
<path d="M176.165 126.986C174.967 129.623 174.3 132.551 174.3 135.636C174.3 147.197 183.672 156.569 195.232 156.569C200.746 156.569 205.761 154.436 209.5 150.951C206.208 158.196 198.909 163.235 190.433 163.235C178.872 163.235 169.5 153.863 169.5 142.302C169.5 136.255 172.065 130.808 176.165 126.986Z" fill="url(#paint7_linear_4656_21674)"/>
<path d="M176.165 126.986C174.967 129.623 174.3 132.551 174.3 135.636C174.3 147.197 183.672 156.569 195.232 156.569C200.746 156.569 205.761 154.436 209.5 150.951C206.208 158.196 198.909 163.235 190.433 163.235C178.872 163.235 169.5 153.863 169.5 142.302C169.5 136.255 172.065 130.808 176.165 126.986Z" fill="url(#paint8_linear_4656_21674)"/>
</g>
<defs>
<filter id="filter0_df_4656_21674" x="284.5" y="107.5" width="28" height="28" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_4656_21674"/>
<feOffset/>
<feGaussianBlur stdDeviation="5.25"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4656_21674"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4656_21674" result="shape"/>
<feGaussianBlur stdDeviation="2" result="effect2_foregroundBlur_4656_21674"/>
</filter>
<filter id="filter1_df_4656_21674" x="248.5" y="50.5" width="25" height="28" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_4656_21674"/>
<feOffset/>
<feGaussianBlur stdDeviation="5.25"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4656_21674"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4656_21674" result="shape"/>
<feGaussianBlur stdDeviation="2" result="effect2_foregroundBlur_4656_21674"/>
</filter>
<filter id="filter2_df_4656_21674" x="81.1" y="52.1" width="28.8" height="28.8" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feMorphology radius="0.6" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_4656_21674"/>
<feOffset/>
<feGaussianBlur stdDeviation="3.15"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4656_21674"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4656_21674" result="shape"/>
<feGaussianBlur stdDeviation="0.3" result="effect2_foregroundBlur_4656_21674"/>
</filter>
<filter id="filter3_df_4656_21674" x="24.1" y="149.1" width="28.8" height="28.8" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feMorphology radius="0.6" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_4656_21674"/>
<feOffset/>
<feGaussianBlur stdDeviation="3.15"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4656_21674"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4656_21674" result="shape"/>
<feGaussianBlur stdDeviation="0.3" result="effect2_foregroundBlur_4656_21674"/>
</filter>
<filter id="filter4_df_4656_21674" x="322.1" y="72.1" width="28.8" height="28.8" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feMorphology radius="0.6" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_4656_21674"/>
<feOffset/>
<feGaussianBlur stdDeviation="3.15"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4656_21674"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4656_21674" result="shape"/>
<feGaussianBlur stdDeviation="0.3" result="effect2_foregroundBlur_4656_21674"/>
</filter>
<filter id="filter5_df_4656_21674" x="63.98" y="117.98" width="23.04" height="23.04" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feMorphology radius="0.48" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_4656_21674"/>
<feOffset/>
<feGaussianBlur stdDeviation="2.52"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4656_21674"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4656_21674" result="shape"/>
<feGaussianBlur stdDeviation="0.24" result="effect2_foregroundBlur_4656_21674"/>
</filter>
<filter id="filter6_df_4656_21674" x="257.5" y="202.5" width="28" height="28" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_4656_21674"/>
<feOffset/>
<feGaussianBlur stdDeviation="5.25"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4656_21674"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4656_21674" result="shape"/>
<feGaussianBlur stdDeviation="2" result="effect2_foregroundBlur_4656_21674"/>
</filter>
<filter id="filter7_df_4656_21674" x="292.5" y="159.5" width="48" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_4656_21674"/>
<feOffset/>
<feGaussianBlur stdDeviation="5.25"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4656_21674"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4656_21674" result="shape"/>
<feGaussianBlur stdDeviation="0.5" result="effect2_foregroundBlur_4656_21674"/>
</filter>
<filter id="filter8_df_4656_21674" x="30.5" y="65.5" width="48" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_4656_21674"/>
<feOffset/>
<feGaussianBlur stdDeviation="5.25"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4656_21674"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4656_21674" result="shape"/>
<feGaussianBlur stdDeviation="0.5" result="effect2_foregroundBlur_4656_21674"/>
</filter>
<filter id="filter9_df_4656_21674" x="89.5" y="159.5" width="25" height="28" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_4656_21674"/>
<feOffset/>
<feGaussianBlur stdDeviation="5.25"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4656_21674"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4656_21674" result="shape"/>
<feGaussianBlur stdDeviation="2" result="effect2_foregroundBlur_4656_21674"/>
</filter>
<filter id="filter10_f_4656_21674" x="156.1" y="113.586" width="66.8" height="63.049" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="6.7" result="effect1_foregroundBlur_4656_21674"/>
</filter>
<linearGradient id="paint0_linear_4656_21674" x1="198" y1="22.9607" x2="198" y2="268.181" gradientUnits="userSpaceOnUse">
<stop stop-color="#142040"/>
<stop offset="0.644231" stop-color="#14234B"/>
<stop offset="1" stop-color="#1B284A" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint1_linear_4656_21674" x1="315.5" y1="161" x2="315.5" y2="207" gradientUnits="userSpaceOnUse">
<stop stop-color="#D7E2F7" stop-opacity="0"/>
<stop offset="0.466346" stop-color="#D7E2F7"/>
<stop offset="1" stop-color="#D7E2F7" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint2_linear_4656_21674" x1="293" y1="184.5" x2="339" y2="184.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#D7E2F7" stop-opacity="0"/>
<stop offset="0.466346" stop-color="#D7E2F7"/>
<stop offset="1" stop-color="#D7E2F7" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint3_linear_4656_21674" x1="53.5" y1="67" x2="53.5" y2="113" gradientUnits="userSpaceOnUse">
<stop stop-color="#D7E2F7" stop-opacity="0"/>
<stop offset="0.466346" stop-color="#D7E2F7"/>
<stop offset="1" stop-color="#D7E2F7" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint4_linear_4656_21674" x1="31" y1="90.5" x2="77" y2="90.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#D7E2F7" stop-opacity="0"/>
<stop offset="0.466346" stop-color="#D7E2F7"/>
<stop offset="1" stop-color="#D7E2F7" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint5_linear_4656_21674" x1="189.5" y1="126.986" x2="189.5" y2="163.235" gradientUnits="userSpaceOnUse">
<stop stop-color="#D7E2F7"/>
<stop offset="1" stop-color="#7891C1"/>
</linearGradient>
<linearGradient id="paint6_linear_4656_21674" x1="189.5" y1="126.986" x2="195.774" y2="163.063" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#7891C1"/>
</linearGradient>
<linearGradient id="paint7_linear_4656_21674" x1="189.5" y1="126.986" x2="189.5" y2="163.235" gradientUnits="userSpaceOnUse">
<stop stop-color="#D7E2F7"/>
<stop offset="1" stop-color="#7891C1"/>
</linearGradient>
<linearGradient id="paint8_linear_4656_21674" x1="189.5" y1="126.986" x2="195.774" y2="163.063" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#7891C1"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

View file

@ -0,0 +1,14 @@
<svg width="375" height="304" viewBox="0 0 375 304" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="-40" y="-27" width="475" height="331" fill="url(#paint0_linear_4656_21863)"/>
<rect x="285" y="163" width="101" height="49" rx="24.5" fill="#EFEFF8"/>
<circle cx="331" cy="173" r="31" fill="#EFEFF8"/>
<rect x="-30" y="108" width="115" height="49" rx="24.5" fill="#EFEFF8"/>
<circle cx="16" cy="118" r="31" fill="#EFEFF8"/>
<rect x="251" y="193" width="30" height="19" rx="9.5" fill="#EFEFF8"/>
<defs>
<linearGradient id="paint0_linear_4656_21863" x1="197.5" y1="-27" x2="197.5" y2="304" gradientUnits="userSpaceOnUse">
<stop stop-color="#68BEEF"/>
<stop offset="1" stop-color="white" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 745 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 KiB

View file

@ -1,6 +1,6 @@
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/new_wallet/new_wallet_type_page.dart';
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

View file

@ -14,8 +14,8 @@ import 'package:cake_wallet/exchange/trade_state.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/store/app_store.dart';
import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cw_core/crypto_currency.dart';
import 'package:cw_core/wallet_base.dart';
import 'package:cw_core/wallet_type.dart';
@ -26,12 +26,12 @@ import 'package:url_launcher/url_launcher.dart';
class MoonPayProvider extends BuyProvider {
MoonPayProvider({
required SettingsStore settingsStore,
required AppStore appStore,
required WalletBase wallet,
bool isTestEnvironment = false,
}) : baseSellUrl = isTestEnvironment ? _baseSellTestUrl : _baseSellProductUrl,
baseBuyUrl = isTestEnvironment ? _baseBuyTestUrl : _baseBuyProductUrl,
this._settingsStore = settingsStore,
this._appStore = appStore,
super(
wallet: wallet,
isTestEnvironment: isTestEnvironment,
@ -41,7 +41,7 @@ class MoonPayProvider extends BuyProvider {
supportedFiatList: supportedFiatToCryptoPairs(
notSupportedFiat: _notSupportedFiat, notSupportedCrypto: _notSupportedCrypto));
final SettingsStore _settingsStore;
final AppStore _appStore;
static const _baseSellTestUrl = 'sell-sandbox.moonpay.com';
static const _baseSellProductUrl = 'sell.moonpay.com';
@ -86,15 +86,12 @@ class MoonPayProvider extends BuyProvider {
static String get _exchangeHelperApiKey => secrets.exchangeHelperApiKey;
static String themeToMoonPayTheme(ThemeBase theme) {
static String themeToMoonPayTheme(MaterialThemeBase theme) {
switch (theme.type) {
case ThemeType.bright:
case ThemeType.light:
return 'light';
case ThemeType.dark:
return 'dark';
case ThemeType.oled:
return 'dark';
}
}
@ -237,9 +234,9 @@ class MoonPayProvider extends BuyProvider {
required String cryptoCurrencyAddress,
String? countryCode}) async {
final Map<String, String> params = {
'theme': themeToMoonPayTheme(_settingsStore.currentTheme),
'language': _settingsStore.languageCode,
'colorCode': _settingsStore.currentTheme.type == ThemeType.dark
'theme': themeToMoonPayTheme(_appStore.themeStore.currentTheme),
'language': _appStore.settingsStore.languageCode,
'colorCode': _appStore.themeStore.currentTheme.isDark
? '#${Palette.blueCraiola.value.toRadixString(16).substring(2, 8)}'
: '#${Palette.moderateSlateBlue.value.toRadixString(16).substring(2, 8)}',
'baseCurrencyCode': isBuyAction ? quote.fiatCurrency.name : quote.cryptoCurrency.name,
@ -260,7 +257,6 @@ class MoonPayProvider extends BuyProvider {
try {
final uri = await requestMoonPayUrl(
walletAddress: cryptoCurrencyAddress,
settingsStore: _settingsStore,
isBuyAction: isBuyAction,
amount: amount.toString(),
params: params);
@ -289,7 +285,6 @@ class MoonPayProvider extends BuyProvider {
Future<Uri> requestMoonPayUrl({
required String walletAddress,
required SettingsStore settingsStore,
required bool isBuyAction,
required Map<String, String> params,
String? amount,

View file

@ -8,8 +8,7 @@ import 'package:cake_wallet/buy/pairs_utils.dart';
import 'package:cake_wallet/buy/payment_method.dart';
import 'package:cake_wallet/entities/fiat_currency.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/core/theme_store.dart';
import 'package:cw_core/crypto_currency.dart';
import 'package:cw_core/utils/print_verbose.dart';
import 'package:cw_core/wallet_base.dart';
@ -18,7 +17,7 @@ import 'package:http/http.dart' as http;
import 'package:url_launcher/url_launcher.dart';
class OnRamperBuyProvider extends BuyProvider {
OnRamperBuyProvider(this._settingsStore,
OnRamperBuyProvider(this._themeStore,
{required WalletBase wallet, bool isTestEnvironment = false})
: super(wallet: wallet,
isTestEnvironment: isTestEnvironment,
@ -39,7 +38,7 @@ class OnRamperBuyProvider extends BuyProvider {
static const List<FiatCurrency> _notSupportedFiat = [];
static Map<String, dynamic> _onrampMetadata = {};
final SettingsStore _settingsStore;
final ThemeStore _themeStore;
String? recommendedPaymentType;
@ -246,17 +245,13 @@ class OnRamperBuyProvider extends BuyProvider {
String? countryCode}) async {
final actionType = isBuyAction ? 'buy' : 'sell';
final primaryColor = getColorStr(Theme.of(context).primaryColor);
final secondaryColor = getColorStr(Theme.of(context).colorScheme.background);
final primaryTextColor = getColorStr(Theme.of(context).extension<CakeTextTheme>()!.titleColor);
final primaryColor = getColorStr(Theme.of(context).colorScheme.primary,);
final secondaryColor = getColorStr(Theme.of(context).colorScheme.surface);
final primaryTextColor = getColorStr(Theme.of(context).colorScheme.onSurface);
final secondaryTextColor =
getColorStr(Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor);
final containerColor = getColorStr(Theme.of(context).colorScheme.background);
var cardColor = getColorStr(Theme.of(context).cardColor);
if (_settingsStore.currentTheme.title == S.current.high_contrast_theme) {
cardColor = getColorStr(Colors.white);
}
getColorStr(Theme.of(context).colorScheme.onSurfaceVariant);
final containerColor = getColorStr(Theme.of(context).colorScheme.surface);
var cardColor = getColorStr(Theme.of(context).colorScheme.surfaceContainer);
final defaultCrypto =
quote.cryptoCurrency.title + _getNormalizeNetwork(quote.cryptoCurrency).toLowerCase();

View file

@ -3,7 +3,7 @@ import 'dart:io';
import 'package:cake_wallet/core/secure_storage.dart';
import 'package:cake_wallet/entities/get_encryption_key.dart';
import 'package:cake_wallet/entities/transaction_description.dart';
import 'package:cake_wallet/themes/theme_list.dart';
import 'package:cake_wallet/themes/utils/theme_list.dart';
import 'package:cw_core/root_dir.dart';
import 'package:cake_wallet/utils/device_info.dart';
import 'package:cw_core/utils/print_verbose.dart';

View file

@ -39,6 +39,7 @@ import 'package:cake_wallet/src/screens/settings/background_sync_page.dart';
import 'package:cake_wallet/src/screens/wallet_connect/services/bottom_sheet_service.dart';
import 'package:cake_wallet/src/screens/wallet_connect/services/key_service/wallet_connect_key_service.dart';
import 'package:cake_wallet/src/screens/wallet_connect/services/walletkit_service.dart';
import 'package:cake_wallet/themes/core/theme_store.dart';
import 'package:cake_wallet/view_model/dev/monero_background_sync.dart';
import 'package:cake_wallet/view_model/dev/secure_preferences.dart';
import 'package:cake_wallet/view_model/dev/shared_preferences.dart';
@ -152,11 +153,9 @@ import 'package:cake_wallet/src/screens/wallet/wallet_edit_page.dart';
import 'package:cake_wallet/src/screens/wallet_connect/wc_connections_listing_view.dart';
import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart';
import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_page.dart';
import 'package:cake_wallet/themes/theme_list.dart';
import 'package:cake_wallet/utils/device_info.dart';
import 'package:cake_wallet/store/anonpay/anonpay_transactions_store.dart';
import 'package:cake_wallet/utils/payment_request.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/view_model/buy/buy_sell_view_model.dart';
import 'package:cake_wallet/view_model/animated_ur_model.dart';
import 'package:cake_wallet/view_model/dashboard/desktop_sidebar_view_model.dart';
@ -325,6 +324,11 @@ Future<void> setup({
if (!_isSetupFinished) {
getIt.registerSingletonAsync<SharedPreferences>(() => SharedPreferences.getInstance());
getIt.registerSingleton<SecureStorage>(secureStorage);
getIt.registerSingletonAsync<ThemeStore>(() async {
final store = ThemeStore();
await store.loadThemePreferences();
return store;
});
}
final isBitcoinBuyEnabled = (secrets.wyreSecretKey.isNotEmpty) &&
@ -335,10 +339,6 @@ Future<void> setup({
nodeSource: _nodeSource,
powNodeSource: _powNodeSource,
isBitcoinBuyEnabled: isBitcoinBuyEnabled,
// Enforce darkTheme on platforms other than mobile till the design for other themes is completed
initialTheme: responsiveLayoutUtil.shouldRenderMobileUI && DeviceInfo.instance.isMobile
? null
: ThemeList.darkTheme,
);
if (_isSetupFinished) {
@ -356,7 +356,8 @@ Future<void> setup({
authenticationStore: getIt.get<AuthenticationStore>(),
walletList: getIt.get<WalletListStore>(),
settingsStore: getIt.get<SettingsStore>(),
nodeListStore: getIt.get<NodeListStore>()));
nodeListStore: getIt.get<NodeListStore>(),
themeStore: getIt.get<ThemeStore>()));
getIt.registerSingleton<TradesStore>(
TradesStore(tradesSource: _tradesSource, settingsStore: getIt.get<SettingsStore>()));
getIt.registerSingleton<OrdersStore>(
@ -901,7 +902,7 @@ Future<void> setup({
getIt.get<NanoAccountEditOrCreateViewModel>(param1: account)));
getIt.registerFactory(() =>
DisplaySettingsViewModel(getIt.get<SettingsStore>()));
DisplaySettingsViewModel(getIt.get<SettingsStore>(), getIt.get<ThemeStore>()));
getIt.registerFactory(() =>
SilentPaymentsSettingsViewModel(getIt.get<SettingsStore>(), getIt.get<AppStore>().wallet!));
@ -1030,13 +1031,13 @@ Future<void> setup({
getIt.get<AppStore>().wallet!.isHardwareWallet ? getIt.get<LedgerViewModel>() : null));
getIt.registerFactory<MoonPayProvider>(() => MoonPayProvider(
settingsStore: getIt.get<AppStore>().settingsStore,
appStore: getIt.get<AppStore>(),
wallet: getIt.get<AppStore>().wallet!,
isTestEnvironment: kDebugMode,
));
getIt.registerFactory<OnRamperBuyProvider>(() => OnRamperBuyProvider(
getIt.get<AppStore>().settingsStore,
getIt.get<ThemeStore>(),
wallet: getIt.get<AppStore>().wallet!,
));
@ -1056,7 +1057,7 @@ Future<void> setup({
_tradesSource,
getIt.get<ExchangeTemplateStore>(),
getIt.get<TradesStore>(),
getIt.get<AppStore>().settingsStore,
getIt.get<SettingsStore>(),
getIt.get<SharedPreferences>(),
getIt.get<ContactListViewModel>(),
getIt.get<FeesViewModel>(),
@ -1236,7 +1237,7 @@ Future<void> setup({
TradeDetailsViewModel(
tradeForDetails: trade,
trades: _tradesSource,
settingsStore: getIt.get<SettingsStore>()));
appStore: getIt.get<AppStore>()));
getIt.registerFactory(() => CakeFeaturesViewModel(getIt.get<CakePayService>()));
@ -1431,7 +1432,7 @@ Future<void> setup({
(AnonpayInvoiceInfo anonpayInvoiceInfo, _) => AnonpayDetailsViewModel(
anonPayApi: getIt.get<AnonPayApi>(),
anonpayInvoiceInfo: anonpayInvoiceInfo,
settingsStore: getIt.get<SettingsStore>(),
themeStore: getIt.get<ThemeStore>(),
));
getIt.registerFactoryParam<PayjoinDetailsViewModel, String, TransactionInfo?>(
@ -1440,7 +1441,7 @@ Future<void> setup({
sessionId,
transactionInfo,
payjoinSessionSource: _payjoinSessionSource,
settingsStore: getIt.get<SettingsStore>(),
themeStore: getIt.get<ThemeStore>(),
));
getIt.registerFactoryParam<AnonPayReceivePage, AnonpayInfoBase, void>(

View file

@ -29,7 +29,7 @@ class MainActions {
static MainActions showWalletsAction = MainActions._(
name: (context) => S.of(context).wallets,
image: 'assets/images/wallet_new.png',
image: 'assets/images/wallet_icon.png',
onTap: (BuildContext context, DashboardViewModel viewModel) async {
Navigator.pushNamed(
context,
@ -42,7 +42,7 @@ class MainActions {
static MainActions receiveAction = MainActions._(
name: (context) => S.of(context).receive,
image: 'assets/images/received.png',
image: 'assets/images/receive.png',
onTap: (BuildContext context, DashboardViewModel viewModel) async {
Navigator.pushNamed(context, Routes.addressPage);
},
@ -50,7 +50,7 @@ class MainActions {
static MainActions swapAction = MainActions._(
name: (context) => S.of(context).swap,
image: 'assets/images/transfer.png',
image: 'assets/images/swap.png',
isEnabled: (viewModel) => viewModel.isEnabledSwapAction,
canShow: (viewModel) => viewModel.hasSwapAction,
onTap: (BuildContext context, DashboardViewModel viewModel) async {
@ -62,7 +62,7 @@ class MainActions {
static MainActions sendAction = MainActions._(
name: (context) => S.of(context).send,
image: 'assets/images/upload.png',
image: 'assets/images/send2.png',
isEnabled: (viewModel) => viewModel.canSend,
onTap: (BuildContext context, DashboardViewModel viewModel) async {
Navigator.pushNamed(context, Routes.send);
@ -71,7 +71,7 @@ class MainActions {
static MainActions tradeAction = MainActions._(
name: (context) => S.of(context).buy,
image: 'assets/images/buy_sell.png',
image: 'assets/images/buy.png',
isEnabled: (viewModel) => viewModel.isEnabledTradeAction,
canShow: (viewModel) => viewModel.hasTradeAction,
onTap: (BuildContext context, DashboardViewModel viewModel) async {

View file

@ -34,6 +34,7 @@ class PreferencesKey {
static const disableExchangeKey = 'disable_exchange';
static const exchangeStatusKey = 'exchange_status';
static const currentTheme = 'current_theme';
static const themeMode = 'theme_mode';
static const displayActionListModeKey = 'display_list_mode';
static const currentPinLength = 'current_pin_length';
static const currentLanguageCode = 'language_code';

View file

@ -15,7 +15,7 @@ Future<String?> presentQRScanner(BuildContext context) async {
try {
final result = await Navigator.of(context).push<String>(
MaterialPageRoute(
builder:(context) {
builder: (context) {
return BarcodeScannerSimple();
},
),
@ -67,7 +67,7 @@ class _BarcodeScannerSimpleState extends State<BarcodeScannerSimple> {
void _handleBarcodeInternal(BarcodeCapture barcodes) {
for (final barcode in barcodes.barcodes) {
// don't handle unknown QR codes
if (barcode.rawValue?.trim().isEmpty??false == false) continue;
if (barcode.rawValue?.trim().isEmpty ?? false == false) continue;
if (barcode.rawValue!.startsWith("ur:")) {
if (urCodes.contains(barcode.rawValue)) continue;
setState(() {
@ -81,7 +81,8 @@ class _BarcodeScannerSimpleState extends State<BarcodeScannerSimple> {
SchedulerBinding.instance.addPostFrameCallback((_) {
Navigator.of(context).pop(ur.inputs.join("\n"));
});
};
}
;
}
}
if (urCodes.isNotEmpty) return;
@ -110,18 +111,21 @@ class _BarcodeScannerSimpleState extends State<BarcodeScannerSimple> {
ToggleFlashlightButton(controller: ctrl),
],
),
backgroundColor: Colors.black,
backgroundColor: Theme.of(context).colorScheme.surface,
body: Stack(
children: [
MobileScanner(
onDetect: _handleBarcode,
controller: ctrl,
),
if (ur.inputs.length != 0)
Center(child:
Text(
if (ur.inputs.length != 0)
Center(
child: Text(
"${ur.inputs.length}/${ur.count}",
style: Theme.of(context).textTheme.displayLarge?.copyWith(color: Colors.white)
style: Theme.of(context)
.textTheme
.displayLarge
?.copyWith(color: Theme.of(context).colorScheme.onSurface),
),
),
SizedBox(
@ -158,7 +162,6 @@ class _BarcodeScannerSimpleState extends State<BarcodeScannerSimple> {
}
}
class ToggleFlashlightButton extends StatelessWidget {
const ToggleFlashlightButton({required this.controller, super.key});
@ -199,9 +202,9 @@ class ToggleFlashlightButton extends StatelessWidget {
},
);
case TorchState.unavailable:
return const Icon(
return Icon(
Icons.no_flash,
color: Colors.grey,
color: Theme.of(context).colorScheme.onSurfaceVariant,
);
}
},
@ -326,16 +329,14 @@ class ProgressPainter extends CustomPainter {
const fullAngle = 360.0;
var startAngle = 0.0;
for (int i = 0; i < urQrProgress.expectedPartCount.toInt(); i++) {
var sweepAngle =
(1 / urQrProgress.expectedPartCount) * fullAngle * pi / 180.0;
drawSector(canvas, urQrProgress.receivedPartIndexes.contains(i), rect,
startAngle, sweepAngle);
var sweepAngle = (1 / urQrProgress.expectedPartCount) * fullAngle * pi / 180.0;
drawSector(
canvas, urQrProgress.receivedPartIndexes.contains(i), rect, startAngle, sweepAngle);
startAngle += sweepAngle;
}
}
void drawSector(Canvas canvas, bool isActive, Rect rect, double startAngle,
double sweepAngle) {
void drawSector(Canvas canvas, bool isActive, Rect rect, double startAngle, double sweepAngle) {
final paint = Paint()
..style = PaintingStyle.stroke
..strokeWidth = 8

View file

@ -25,7 +25,8 @@ import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/root/root.dart';
import 'package:cake_wallet/store/app_store.dart';
import 'package:cake_wallet/store/authentication_store.dart';
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cake_wallet/themes/utils/theme_provider.dart';
import 'package:cake_wallet/utils/device_info.dart';
import 'package:cake_wallet/utils/exception_handler.dart';
import 'package:cake_wallet/view_model/link_view_model.dart';
@ -206,8 +207,7 @@ Future<void> initializeAppConfigs({bool loadWallet = true}) async {
final havenSeedStoreBoxKey =
await getEncryptionKey(secureStorage: secureStorage, forKey: HavenSeedStore.boxKey);
final havenSeedStore = await CakeHive.openBox<HavenSeedStore>(
HavenSeedStore.boxName,
final havenSeedStore = await CakeHive.openBox<HavenSeedStore>(HavenSeedStore.boxName,
encryptionKey: havenSeedStoreBoxKey);
await initialSetup(
@ -232,25 +232,26 @@ Future<void> initializeAppConfigs({bool loadWallet = true}) async {
);
}
Future<void> initialSetup(
{required bool loadWallet,
required SharedPreferences sharedPreferences,
required Box<Node> nodes,
required Box<Node> powNodes,
required Box<WalletInfo> walletInfoSource,
required Box<Contact> contactSource,
required Box<Trade> tradesSource,
required Box<Order> ordersSource,
// required FiatConvertationService fiatConvertationService,
required Box<Template> templates,
required Box<ExchangeTemplate> exchangeTemplates,
required Box<TransactionDescription> transactionDescriptions,
required SecureStorage secureStorage,
required Box<AnonpayInvoiceInfo> anonpayInvoiceInfo,
required Box<UnspentCoinsInfo> unspentCoinsInfoSource,
required Box<PayjoinSession> payjoinSessionSource,
required Box<HavenSeedStore> havenSeedStore,
int initialMigrationVersion = 15, }) async {
Future<void> initialSetup({
required bool loadWallet,
required SharedPreferences sharedPreferences,
required Box<Node> nodes,
required Box<Node> powNodes,
required Box<WalletInfo> walletInfoSource,
required Box<Contact> contactSource,
required Box<Trade> tradesSource,
required Box<Order> ordersSource,
// required FiatConvertationService fiatConvertationService,
required Box<Template> templates,
required Box<ExchangeTemplate> exchangeTemplates,
required Box<TransactionDescription> transactionDescriptions,
required SecureStorage secureStorage,
required Box<AnonpayInvoiceInfo> anonpayInvoiceInfo,
required Box<UnspentCoinsInfo> unspentCoinsInfoSource,
required Box<PayjoinSession> payjoinSessionSource,
required Box<HavenSeedStore> havenSeedStore,
int initialMigrationVersion = 15,
}) async {
LanguageService.loadLocaleList();
await defaultSettingsMigration(
secureStorage: secureStorage,
@ -289,50 +290,78 @@ class App extends StatefulWidget {
AppState createState() => AppState();
}
class AppState extends State<App> with SingleTickerProviderStateMixin {
class AppState extends State<App> with SingleTickerProviderStateMixin, WidgetsBindingObserver {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
@override
void didChangePlatformBrightness() {
final appStore = getIt.get<AppStore>();
if (appStore.themeStore.themeMode == ThemeMode.system) {
final systemTheme = appStore.themeStore.getThemeFromSystem();
if (appStore.themeStore.currentTheme != systemTheme) {
appStore.themeStore.setTheme(systemTheme);
}
}
}
@override
Widget build(BuildContext context) {
return Observer(builder: (BuildContext context) {
final appStore = getIt.get<AppStore>();
final authService = getIt.get<AuthService>();
final linkViewModel = getIt.get<LinkViewModel>();
final settingsStore = appStore.settingsStore;
final statusBarColor = Colors.transparent;
final authenticationStore = getIt.get<AuthenticationStore>();
final initialRoute = authenticationStore.state == AuthenticationState.uninitialized
? Routes.welcome
: Routes.login;
final currentTheme = settingsStore.currentTheme;
final statusBarBrightness =
currentTheme.type == ThemeType.dark ? Brightness.light : Brightness.dark;
final statusBarIconBrightness =
currentTheme.type == ThemeType.dark ? Brightness.light : Brightness.dark;
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: statusBarColor,
statusBarBrightness: statusBarBrightness,
statusBarIconBrightness: statusBarIconBrightness));
return Observer(
builder: (BuildContext context) {
final appStore = getIt.get<AppStore>();
final authService = getIt.get<AuthService>();
final linkViewModel = getIt.get<LinkViewModel>();
final statusBarColor = Colors.transparent;
final authenticationStore = getIt.get<AuthenticationStore>();
final initialRoute = authenticationStore.state == AuthenticationState.uninitialized
? Routes.welcome
: Routes.login;
final currentTheme = appStore.themeStore.currentTheme;
final statusBarBrightness = currentTheme.isDark ? Brightness.light : Brightness.dark;
final statusBarIconBrightness = currentTheme.isDark ? Brightness.light : Brightness.dark;
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: statusBarColor,
statusBarBrightness: statusBarBrightness,
statusBarIconBrightness: statusBarIconBrightness));
return Root(
return Root(
key: widget.key ?? rootKey,
appStore: appStore,
authenticationStore: authenticationStore,
navigatorKey: navigatorKey,
authService: authService,
linkViewModel: linkViewModel,
child: MaterialApp(
navigatorObservers: [routeObserver],
navigatorKey: navigatorKey,
debugShowCheckedModeBanner: false,
theme: settingsStore.theme,
localizationsDelegates: localizationDelegates,
supportedLocales: S.delegate.supportedLocales,
locale: Locale(settingsStore.languageCode),
onGenerateRoute: (settings) => Router.createRoute(settings),
initialRoute: initialRoute,
scrollBehavior: AppScrollBehavior(),
home: _Home(),
));
});
child: ThemeProvider(
themeStore: appStore.themeStore,
materialAppBuilder: (context, theme, darkTheme, themeMode) => MaterialApp(
navigatorObservers: [routeObserver],
navigatorKey: navigatorKey,
debugShowCheckedModeBanner: false,
theme: theme,
darkTheme: darkTheme,
themeMode: themeMode,
localizationsDelegates: localizationDelegates,
supportedLocales: S.delegate.supportedLocales,
locale: Locale(appStore.settingsStore.languageCode),
onGenerateRoute: (settings) => Router.createRoute(settings),
initialRoute: initialRoute,
scrollBehavior: AppScrollBehavior(),
home: _Home(),
),
),
);
},
);
}
}
@ -392,11 +421,15 @@ class TopLevelErrorWidget extends StatelessWidget {
children: [
Text(
'Error:\n${error.toString()}',
style: TextStyle(fontSize: 22),
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
fontSize: 22,
),
),
Text(
'Stack trace:\n${stackTrace.toString()}',
style: TextStyle(fontSize: 16),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 16,
),
),
],
),

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:cake_wallet/anonpay/anonpay_info_base.dart';
import 'package:cake_wallet/anonpay/anonpay_invoice_info.dart';
import 'package:cake_wallet/core/new_wallet_arguments.dart';
@ -160,7 +162,13 @@ Route<dynamic> createRoute(RouteSettings settings) {
if (SettingsStoreBase.walletPasswordDirectInput) {
return createRoute(RouteSettings(name: Routes.welcomePage));
}
return CupertinoPageRoute<void>(
if (Platform.isIOS) return CupertinoPageRoute<void>(
builder: (_) =>
getIt.get<SetupPinCodePage>(param1: (PinCodeState<PinCodeWidget> context, dynamic _) {
Navigator.of(context.context).pushNamed(Routes.welcomePage);
}),
fullscreenDialog: true);
else return MaterialPageRoute<void>(
builder: (_) =>
getIt.get<SetupPinCodePage>(param1: (PinCodeState<PinCodeWidget> context, dynamic _) {
Navigator.of(context.context).pushNamed(Routes.welcomePage);
@ -182,26 +190,44 @@ Route<dynamic> createRoute(RouteSettings settings) {
return createRoute(RouteSettings(name: Routes.newWalletType));
case Routes.newWalletType:
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<NewWalletTypePage>(
param1: NewWalletTypeArguments(
onTypeSelected: (BuildContext context, WalletType type) =>
Navigator.of(context).pushNamed(
Routes.newWallet,
arguments: NewWalletArguments(type: type),
if (Platform.isIOS) {
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<NewWalletTypePage>(
param1: NewWalletTypeArguments(
onTypeSelected: (BuildContext context, WalletType type) =>
Navigator.of(context).pushNamed(
Routes.newWallet,
arguments: NewWalletArguments(type: type),
),
isCreate: true,
isHardwareWallet: false,
),
isCreate: true,
isHardwareWallet: false,
),
),
);
);
} else {
return MaterialPageRoute<void>(
builder: (_) => getIt.get<NewWalletTypePage>(
param1: NewWalletTypeArguments(
onTypeSelected: (BuildContext context, WalletType type) =>
Navigator.of(context).pushNamed(
Routes.newWallet,
arguments: NewWalletArguments(type: type),
),
isCreate: true,
isHardwareWallet: false,
),
),
);
}
case Routes.walletGroupsDisplayPage:
final type = settings.arguments as WalletType;
final walletGroupsDisplayVM = getIt.get<WalletGroupsDisplayViewModel>(param1: type);
return CupertinoPageRoute<void>(
builder: (_) => WalletGroupsDisplayPage(walletGroupsDisplayVM));
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (_) => WalletGroupsDisplayPage(walletGroupsDisplayVM));
else return MaterialPageRoute<void>(builder: (_) => WalletGroupsDisplayPage(walletGroupsDisplayVM));
case Routes.newWallet:
final args = settings.arguments as NewWalletArguments;
@ -209,7 +235,14 @@ Route<dynamic> createRoute(RouteSettings settings) {
final walletNewVM = getIt.get<WalletNewVM>(param1: args);
final seedSettingsViewModel = getIt.get<SeedSettingsViewModel>();
return CupertinoPageRoute<void>(
if (Platform.isIOS) return CupertinoPageRoute<void>(
builder: (_) => NewWalletPage(
walletNewVM,
seedSettingsViewModel,
isChildWallet: args.isChildWallet,
),
);
else return MaterialPageRoute<void>(
builder: (_) => NewWalletPage(
walletNewVM,
seedSettingsViewModel,
@ -234,16 +267,27 @@ Route<dynamic> createRoute(RouteSettings settings) {
callback = settings.arguments as Function(PinCodeState<PinCodeWidget>, String);
}
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<SetupPinCodePage>(param1: callback));
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (_) => getIt.get<SetupPinCodePage>(param1: callback));
else return MaterialPageRoute<void>(builder: (_) => getIt.get<SetupPinCodePage>(param1: callback));
case Routes.restoreWalletType:
return CupertinoPageRoute<void>(
if (Platform.isIOS) return CupertinoPageRoute<void>(
builder: (_) => getIt.get<NewWalletTypePage>(
param1: NewWalletTypeArguments(
onTypeSelected: (BuildContext context, WalletType type) {
final arg = {'walletType': type};
Navigator.of(context).pushNamed(Routes.restoreWallet, arguments: arg);},
Navigator.of(context).pushNamed(Routes.restoreWallet, arguments: arg);},
isCreate: false,
isHardwareWallet: false,
),
),
);
else return MaterialPageRoute<void>(
builder: (_) => getIt.get<NewWalletTypePage>(
param1: NewWalletTypeArguments(
onTypeSelected: (BuildContext context, WalletType type) {
final arg = {'walletType': type};
Navigator.of(context).pushNamed(Routes.restoreWallet, arguments: arg);},
isCreate: false,
isHardwareWallet: false,
),
@ -256,15 +300,21 @@ Route<dynamic> createRoute(RouteSettings settings) {
}
final isNewInstall = settings.arguments as bool;
return CupertinoPageRoute<void>(
fullscreenDialog: true,
builder: (_) => getIt.get<RestoreOptionsPage>(param1: isNewInstall));
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<RestoreOptionsPage>(param1: isNewInstall));
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<RestoreOptionsPage>(param1: isNewInstall));
}
case Routes.restoreWalletFromSeedKeys:
if (isSingleCoin) {
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<WalletRestorePage>(param1: availableWalletTypes.first));
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<WalletRestorePage>(param1: availableWalletTypes.first));
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<WalletRestorePage>(param1: availableWalletTypes.first));
}
}
if (Platform.isIOS) {
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<NewWalletTypePage>(
param1: NewWalletTypeArguments(
@ -276,6 +326,19 @@ Route<dynamic> createRoute(RouteSettings settings) {
),
),
);
} else {
return MaterialPageRoute<void>(
builder: (_) => getIt.get<NewWalletTypePage>(
param1: NewWalletTypeArguments(
onTypeSelected: (BuildContext context, WalletType type) {
final arg = {'walletType': type};
Navigator.of(context).pushNamed(Routes.restoreWallet, arguments: arg);},
isCreate: false,
isHardwareWallet: false,
),
),
);
}
case Routes.restoreWalletFromHardwareWallet:
if (isSingleCoin) {
@ -328,9 +391,11 @@ Route<dynamic> createRoute(RouteSettings settings) {
);
case Routes.seed:
return MaterialPageRoute<void>(
fullscreenDialog: true,
builder: (_) => getIt.get<WalletSeedPage>(param1: settings.arguments as bool));
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<WalletSeedPage>(param1: settings.arguments as bool));
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<WalletSeedPage>(param1: settings.arguments as bool));
}
case Routes.restoreWallet:
final args = settings.arguments as Map<String, dynamic>?;
@ -356,24 +421,29 @@ Route<dynamic> createRoute(RouteSettings settings) {
final initialPaymentRequest = args?['paymentRequest'] as PaymentRequest?;
final coinTypeToSpendFrom = args?['coinTypeToSpendFrom'] as UnspentCoinType?;
return CupertinoPageRoute<void>(
fullscreenDialog: true,
builder: (_) => getIt.get<SendPage>(
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<SendPage>(
param1: initialPaymentRequest,
param2: coinTypeToSpendFrom,
),
);
));
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<SendPage>(
param1: initialPaymentRequest,
param2: coinTypeToSpendFrom,
));
}
case Routes.sendTemplate:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<SendTemplatePage>());
case Routes.receive:
return CupertinoPageRoute<void>(builder: (_) => getIt.get<ReceivePage>());
return CupertinoPageRoute<void>(builder: (context) => getIt.get<ReceivePage>());
case Routes.addressPage:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<AddressPage>());
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (context) => getIt.get<AddressPage>());
else return MaterialPageRoute<void>(builder: (context) => getIt.get<AddressPage>());
case Routes.transactionDetails:
return CupertinoPageRoute<void>(
@ -459,32 +529,41 @@ Route<dynamic> createRoute(RouteSettings settings) {
onWillPop: () async => false));
case Routes.silentPaymentsSettings:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<SilentPaymentsSettingsPage>());
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (context) => getIt.get<SilentPaymentsSettingsPage>());
else return MaterialPageRoute<void>(builder: (context) => getIt.get<SilentPaymentsSettingsPage>());
case Routes.mwebSettings:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<MwebSettingsPage>());
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (context) => getIt.get<MwebSettingsPage>());
else return MaterialPageRoute<void>(builder: (context) => getIt.get<MwebSettingsPage>());
case Routes.mwebLogs:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<MwebLogsPage>());
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (context) => getIt.get<MwebLogsPage>());
else return MaterialPageRoute<void>(builder: (context) => getIt.get<MwebLogsPage>());
case Routes.mwebNode:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<MwebNodePage>());
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (context) => getIt.get<MwebNodePage>());
else return MaterialPageRoute<void>(builder: (context) => getIt.get<MwebNodePage>());
case Routes.connectionSync:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<ConnectionSyncPage>());
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<ConnectionSyncPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<ConnectionSyncPage>());
}
case Routes.securityBackupPage:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<SecurityBackupPage>());
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<SecurityBackupPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<SecurityBackupPage>());
}
case Routes.privacyPage:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<PrivacyPage>());
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<PrivacyPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<PrivacyPage>());
}
case Routes.trocadorProvidersPage:
return CupertinoPageRoute<void>(
@ -495,12 +574,18 @@ Route<dynamic> createRoute(RouteSettings settings) {
fullscreenDialog: true, builder: (_) => getIt.get<DomainLookupsPage>());
case Routes.displaySettingsPage:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<DisplaySettingsPage>());
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<DisplaySettingsPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<DisplaySettingsPage>());
}
case Routes.otherSettingsPage:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<OtherSettingsPage>());
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<OtherSettingsPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<OtherSettingsPage>());
}
case Routes.newNode:
final args = settings.arguments as Map<String, dynamic>?;
@ -537,8 +622,12 @@ Route<dynamic> createRoute(RouteSettings settings) {
getIt.get<NanoAccountEditOrCreatePage>(param1: settings.arguments as NanoAccount?));
case Routes.addressBook:
return MaterialPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<ContactListPage>());
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<ContactListPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<ContactListPage>());
}
case Routes.pickerAddressBook:
final selectedCurrency = settings.arguments as CryptoCurrency?;
@ -549,12 +638,19 @@ Route<dynamic> createRoute(RouteSettings settings) {
return MaterialPageRoute<void>(builder: (_) => getIt.get<AddressListPage>());
case Routes.addressBookAddContact:
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<ContactPage>(param1: settings.arguments as ContactRecord?));
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<ContactPage>(param1: settings.arguments as ContactRecord?));
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<ContactPage>(param1: settings.arguments as ContactRecord?));
}
case Routes.showKeys:
return MaterialPageRoute<void>(
builder: (_) => getIt.get<WalletKeysPage>(), fullscreenDialog: true);
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<WalletKeysPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<WalletKeysPage>());
}
case Routes.exchangeTrade:
return CupertinoPageRoute<void>(builder: (_) => getIt.get<ExchangeTradePage>());
@ -573,7 +669,11 @@ Route<dynamic> createRoute(RouteSettings settings) {
case Routes.buySellPage:
final args = settings.arguments as bool;
return MaterialPageRoute<void>(builder: (_) => getIt.get<BuySellPage>(param1: args));
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<BuySellPage>(param1: args));
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<BuySellPage>(param1: args));
}
case Routes.buyOptionsPage:
final args = settings.arguments as List;
@ -590,10 +690,12 @@ Route<dynamic> createRoute(RouteSettings settings) {
fullscreenDialog: true, builder: (_) => getIt.get<BuyWebViewPage>(param1: args));
case Routes.exchange:
return CupertinoPageRoute<void>(
fullscreenDialog: true,
builder: (_) => getIt.get<ExchangePage>(param1: settings.arguments as PaymentRequest?),
);
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<ExchangePage>(param1: settings.arguments as PaymentRequest?));
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<ExchangePage>(param1: settings.arguments as PaymentRequest?));
}
case Routes.exchangeTemplate:
return CupertinoPageRoute<void>(builder: (_) => getIt.get<ExchangeTemplatePage>());
@ -615,8 +717,11 @@ Route<dynamic> createRoute(RouteSettings settings) {
builder: (_) => getIt.get<TransactionSuccessPage>(param1: settings.arguments as String));
case Routes.backup:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<BackupPage>());
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<BackupPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<BackupPage>());
}
case Routes.editBackupPassword:
return CupertinoPageRoute<void>(builder: (_) => getIt.get<EditBackupPasswordPage>());
@ -626,15 +731,21 @@ Route<dynamic> createRoute(RouteSettings settings) {
fullscreenDialog: true, builder: (_) => getIt.get<RestoreFromBackupPage>());
case Routes.support:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<SupportPage>());
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<SupportPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<SupportPage>());
}
case Routes.supportLiveChat:
return CupertinoPageRoute<void>(builder: (_) => getIt.get<SupportChatPage>());
case Routes.supportOtherLinks:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<SupportOtherLinksPage>());
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<SupportOtherLinksPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<SupportOtherLinksPage>());
}
case Routes.unspentCoinsList:
final coinTypeToSpendFrom = settings.arguments as UnspentCoinType?;
@ -654,29 +765,32 @@ Route<dynamic> createRoute(RouteSettings settings) {
));
case Routes.cakePayCardsPage:
return CupertinoPageRoute<void>(builder: (_) => getIt.get<CakePayCardsPage>());
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (context) => getIt.get<CakePayCardsPage>());
else return MaterialPageRoute<void>(builder: (context) => getIt.get<CakePayCardsPage>());
case Routes.cakePayBuyCardPage:
final args = settings.arguments as List;
return CupertinoPageRoute<void>(builder: (_) => getIt.get<CakePayBuyCardPage>(param1: args));
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (_) => getIt.get<CakePayBuyCardPage>(param1: args));
else return MaterialPageRoute<void>(builder: (_) => getIt.get<CakePayBuyCardPage>(param1: args));
case Routes.cakePayBuyCardDetailPage:
final args = settings.arguments as List;
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<CakePayBuyCardDetailPage>(param1: args));
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (_) => getIt.get<CakePayBuyCardDetailPage>(param1: args));
else return MaterialPageRoute<void>(builder: (_) => getIt.get<CakePayBuyCardDetailPage>(param1: args));
case Routes.cakePayWelcomePage:
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<CakePayWelcomePage>(),
);
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (_) => getIt.get<CakePayWelcomePage>(),);
else return MaterialPageRoute<void>(builder: (_) => getIt.get<CakePayWelcomePage>(),);
case Routes.cakePayVerifyOtpPage:
final args = settings.arguments as List;
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<CakePayVerifyOtpPage>(param1: args));
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (_) => getIt.get<CakePayVerifyOtpPage>(param1: args));
else return MaterialPageRoute<void>(builder: (_) => getIt.get<CakePayVerifyOtpPage>(param1: args));
case Routes.cakePayAccountPage:
return CupertinoPageRoute<void>(builder: (_) => getIt.get<CakePayAccountPage>());
if (Platform.isIOS) return CupertinoPageRoute<void>(builder: (_) => getIt.get<CakePayAccountPage>());
else return MaterialPageRoute<void>(builder: (_) => getIt.get<CakePayAccountPage>());
case Routes.webViewPage:
final args = settings.arguments as List;
@ -694,17 +808,28 @@ Route<dynamic> createRoute(RouteSettings settings) {
final toggleTestnet = args['toggleTestnet'] as Function(bool? val);
final restoredWallet = args['restoredWallet'] as RestoredWallet?;
return CupertinoPageRoute<void>(
if (Platform.isIOS) return CupertinoPageRoute<void>(
builder: (_) => AdvancedPrivacySettingsPage(
isFromRestore: isFromRestore,
isChildWallet: isChildWallet,
useTestnet: useTestnet,
toggleUseTestnet: toggleTestnet,
advancedPrivacySettingsViewModel:
getIt.get<AdvancedPrivacySettingsViewModel>(param1: type),
nodeViewModel: getIt.get<NodeCreateOrEditViewModel>(param1: type, param2: false),
seedSettingsViewModel: getIt.get<SeedSettingsViewModel>(),
));
isFromRestore: isFromRestore,
isChildWallet: isChildWallet,
useTestnet: useTestnet,
toggleUseTestnet: toggleTestnet,
advancedPrivacySettingsViewModel:
getIt.get<AdvancedPrivacySettingsViewModel>(param1: type),
nodeViewModel: getIt.get<NodeCreateOrEditViewModel>(param1: type, param2: false),
seedSettingsViewModel: getIt.get<SeedSettingsViewModel>(),
));
else return MaterialPageRoute<void>(
builder: (_) => AdvancedPrivacySettingsPage(
isFromRestore: isFromRestore,
isChildWallet: isChildWallet,
useTestnet: useTestnet,
toggleUseTestnet: toggleTestnet,
advancedPrivacySettingsViewModel:
getIt.get<AdvancedPrivacySettingsViewModel>(param1: type),
nodeViewModel: getIt.get<NodeCreateOrEditViewModel>(param1: type, param2: false),
seedSettingsViewModel: getIt.get<SeedSettingsViewModel>(),
));
case Routes.anonPayInvoicePage:
final args = settings.arguments as List;
@ -842,8 +967,11 @@ Route<dynamic> createRoute(RouteSettings settings) {
return MaterialPageRoute<void>(builder: (_) => getIt.get<ExchangeTradeExternalSendPage>(),);
case Routes.backgroundSync:
return CupertinoPageRoute<void>(
fullscreenDialog: true, builder: (_) => getIt.get<BackgroundSyncPage>());
if (Platform.isIOS) {
return CupertinoPageRoute<void>(builder: (context) => getIt.get<BackgroundSyncPage>());
} else {
return MaterialPageRoute<void>(builder: (context) => getIt.get<BackgroundSyncPage>());
}
case Routes.devMoneroBackgroundSync:
return MaterialPageRoute<void>(
builder: (_) => getIt.get<DevMoneroBackgroundSyncPage>(),

View file

@ -1,7 +1,7 @@
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
import 'package:cake_wallet/src/widgets/gradient_background.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:flutter/material.dart';
@ -14,9 +14,6 @@ abstract class InfoPage extends BasePage {
final String imageLightPath;
final String imageDarkPath;
Image get imageLight => Image.asset(imageLightPath);
Image get imageDark => Image.asset(imageDarkPath);
bool get onWillPop => true;
String get pageTitle;
String get pageDescription;
@ -24,6 +21,13 @@ abstract class InfoPage extends BasePage {
Key? get buttonKey;
void Function(BuildContext) get onPressed;
@override
bool get gradientBackground => true;
@override
Widget Function(BuildContext, Widget) get rootWrapper =>
(BuildContext context, Widget scaffold) => GradientBackground(scaffold: scaffold);
@override
Widget? leading(BuildContext context) => null;
@ -32,10 +36,10 @@ abstract class InfoPage extends BasePage {
@override
Widget body(BuildContext context) {
final image = currentTheme.type == ThemeType.dark ? imageDark : imageLight;
final image = currentTheme.isDark ? imageDarkPath : imageLightPath;
return WillPopScope(
onWillPop: () async => onWillPop,
return PopScope(
canPop: onWillPop,
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.all(24),
@ -47,8 +51,13 @@ abstract class InfoPage extends BasePage {
children: <Widget>[
Expanded(
child: ConstrainedBox(
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3),
child: AspectRatio(aspectRatio: 1, child: image),
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.3,
),
child: AspectRatio(
aspectRatio: 0.9,
child: CakeImageWidget(imageUrl: image),
),
),
),
Expanded(
@ -57,12 +66,7 @@ abstract class InfoPage extends BasePage {
child: Text(
pageDescription,
textAlign: TextAlign.center,
style: TextStyle(
height: 1.7,
fontSize: 14,
fontWeight: FontWeight.normal,
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
),
style: Theme.of(context).textTheme.bodyMedium?.copyWith(height: 1.6),
),
),
),
@ -70,8 +74,8 @@ abstract class InfoPage extends BasePage {
key: buttonKey,
onPressed: () => onPressed(context),
text: buttonText,
color: Theme.of(context).primaryColor,
textColor: Colors.white,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
),
],
),

View file

@ -56,7 +56,7 @@ class _AnonpayDetailsPageBodyState extends State<AnonpayDetailsPageBody> {
id: item.id,
create: item.createdAt,
pair: item.pair,
currentTheme: widget.anonpayDetailsViewModel.settingsStore.currentTheme.type,
currentTheme: widget.anonpayDetailsViewModel.themeStore.currentTheme.type,
onTap: item.onTap,
);
}

View file

@ -22,9 +22,7 @@ abstract class AuthPageState<T extends StatefulWidget> extends State<T> {
}
class AuthPage extends StatefulWidget {
AuthPage(this.authViewModel,
{required this.onAuthenticationFinished,
this.closable = true});
AuthPage(this.authViewModel, {required this.onAuthenticationFinished, this.closable = true});
final AuthViewModel authViewModel;
final OnAuthenticationFinished onAuthenticationFinished;
@ -37,16 +35,14 @@ class AuthPage extends StatefulWidget {
class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
final _key = GlobalKey<ScaffoldState>();
final _pinCodeKey = GlobalKey<PinCodeState>();
final _backArrowImageDarkTheme =
Image.asset('assets/images/close_button.png');
final _backArrowImageDarkTheme = Image.asset('assets/images/close_button.png');
ReactionDisposer? _reaction;
Flushbar<void>? _authBar;
Flushbar<void>? _progressBar;
@override
void initState() {
_reaction ??=
reaction((_) => widget.authViewModel.state, (ExecutionState state) {
_reaction ??= reaction((_) => widget.authViewModel.state, (ExecutionState state) {
if (state is ExecutedSuccessfullyState) {
WidgetsBinding.instance.addPostFrameCallback((_) {
widget.onAuthenticationFinished(true, this);
@ -55,20 +51,20 @@ class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
}
if (state is IsExecutingState) {
WidgetsBinding.instance.addPostFrameCallback((_) {
// null duration to make it indefinite until its disposed
_authBar =
createBar<void>(S.of(context).authentication, duration: null)
..show(context);
});
WidgetsBinding.instance.addPostFrameCallback(
(_) {
// null duration to make it indefinite until its disposed
_authBar = createBar<void>(S.of(context).authentication, context, duration: null)
..show(context);
},
);
}
if (state is FailureState) {
WidgetsBinding.instance.addPostFrameCallback((_) async {
_pinCodeKey.currentState?.clear();
dismissFlushBar(_authBar);
showBar<void>(
context, S.of(context).failed_authentication(state.error));
showBar<void>(context, S.of(context).failed_authentication(state.error));
widget.onAuthenticationFinished(false, this);
});
}
@ -77,14 +73,12 @@ class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
WidgetsBinding.instance.addPostFrameCallback((_) async {
_pinCodeKey.currentState?.clear();
dismissFlushBar(_authBar);
showBar<void>(
context, S.of(context).failed_authentication(state.error));
showBar<void>(context, S.of(context).failed_authentication(state.error));
widget.onAuthenticationFinished(false, this);
});
}
});
if (widget.authViewModel.isBiometricalAuthenticationAllowed) {
WidgetsBinding.instance.addPostFrameCallback((_) async {
await Future<void>.delayed(Duration(milliseconds: 100));
@ -95,8 +89,8 @@ class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
super.initState();
}
Future<void> _showSeedsPopup(BuildContext context, String message) async {
await showPopUp<void>(
Future<void> _showSeedsPopup(BuildContext context, String message) async {
await showPopUp<void>(
context: context,
builder: (BuildContext context) {
return AlertWithTwoActions(
@ -109,8 +103,8 @@ class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
},
actionRightButton: () => Navigator.of(context).pop(),
);
});
}
});
}
@override
void dispose() {
@ -121,8 +115,7 @@ class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
@override
void changeProcessText(String text) {
dismissFlushBar(_authBar);
_progressBar = createBar<void>(text, duration: null)
..show(_key.currentContext!);
_progressBar = createBar<void>(text,context, duration: null)..show(_key.currentContext!);
}
@override
@ -163,15 +156,15 @@ class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
width: 37,
child: InkWell(
onTap: () => Navigator.of(context).pop(),
child: _backArrowImageDarkTheme,
child: _backArrowImageDarkTheme,
),
))
: Container(),
backgroundColor: Theme.of(context).colorScheme.background,
backgroundColor: Theme.of(context).colorScheme.surface,
border: null),
resizeToAvoidBottomInset: false,
body: PinCode((pin, _) => widget.authViewModel.auth(password: pin),
(_) => null, widget.authViewModel.pinLength, false, _pinCodeKey));
body: PinCode((pin, _) => widget.authViewModel.auth(password: pin), (_) => null,
widget.authViewModel.pinLength, false, _pinCodeKey));
}
void dismissFlushBar(Flushbar<dynamic>? bar) {

View file

@ -5,7 +5,6 @@ import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/utils/clipboard_util.dart';
import 'package:cake_wallet/utils/exception_handler.dart';
import 'package:cake_wallet/utils/share_util.dart';
@ -31,65 +30,72 @@ class BackupPage extends BasePage {
fit: StackFit.expand,
children: [
Center(
child: Container(
padding: EdgeInsets.only(left: 24, right: 24),
height: 300,
child: Column(children: [
Text(
S.of(context).backup_password + ':',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 30),
),
Padding(
padding: EdgeInsets.only(top: 20, bottom: 10),
child: Observer(
builder: (_) => GestureDetector(
onTap: () {
ClipboardUtil.setSensitiveDataToClipboard(
ClipboardData(
text: backupViewModelBase
.backupPassword));
showBar<void>(
context,
S.of(context).transaction_details_copied(
S.of(context).backup_password));
},
child: Text(
backupViewModelBase.backupPassword,
style: TextStyle(fontSize: 26),
textAlign: TextAlign.center,
),
))),
Padding(
padding: EdgeInsets.all(20),
child: Container(
padding: EdgeInsets.only(left: 24, right: 24),
height: 300,
child: Column(
children: [
Text(
S.of(context).backup_password + ':',
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.headlineMedium,
),
Padding(
padding: EdgeInsets.only(top: 20, bottom: 10),
child: Observer(
builder: (_) => GestureDetector(
onTap: () {
ClipboardUtil.setSensitiveDataToClipboard(
ClipboardData(text: backupViewModelBase.backupPassword),
);
showBar<void>(
context,
S.of(context).transaction_details_copied(S.of(context).backup_password),
);
},
child: Text(
S.of(context).write_down_backup_password,
style: TextStyle(fontSize: 14, color: Colors.grey),
backupViewModelBase.backupPassword,
style: Theme.of(context).textTheme.titleLarge,
textAlign: TextAlign.center,
))
]))),
),
),
),
),
Padding(
padding: EdgeInsets.all(20),
child: Text(
S.of(context).write_down_backup_password,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
textAlign: TextAlign.center,
),
)
],
),
),
),
Positioned(
child: Column(children: [
PrimaryButton(
onPressed: () =>
Navigator.of(context).pushNamed(Routes.editBackupPassword),
text: S.of(context).change_password,
color: Theme.of(context).cardColor,
textColor: Theme.of(context)
.extension<CakeTextTheme>()!
.buttonTextColor,
),
SizedBox(height: 10),
Observer(
builder: (_) => LoadingPrimaryButton(
isLoading: backupViewModelBase.state is IsExecutingState,
onPressed: () => onExportBackup(context),
text: S.of(context).export_backup,
color: Theme.of(context).primaryColor,
textColor: Colors.white,
child: Column(
children: [
PrimaryButton(
onPressed: () => Navigator.of(context).pushNamed(Routes.editBackupPassword),
text: S.of(context).change_password,
color: Theme.of(context).colorScheme.surfaceContainer,
textColor: Theme.of(context).colorScheme.onSecondaryContainer,
),
),
]),
const SizedBox(height: 10),
Observer(
builder: (_) => LoadingPrimaryButton(
isLoading: backupViewModelBase.state is IsExecutingState,
onPressed: () => onExportBackup(context),
text: S.of(context).export_backup,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
),
),
],
),
bottom: 24,
left: 24,
right: 24,
@ -100,31 +106,33 @@ class BackupPage extends BasePage {
void onExportBackup(BuildContext context) {
showPopUp<void>(
context: context,
builder: (dialogContext) {
return AlertWithTwoActions(
alertTitle: S.of(context).export_backup,
alertContent: S.of(context).save_backup_password,
rightButtonText: S.of(context).seed_alert_yes,
leftButtonText: S.of(context).seed_alert_back,
actionRightButton: () async {
Navigator.of(dialogContext).pop();
final backup = await backupViewModelBase.exportBackup();
context: context,
builder: (dialogContext) {
return AlertWithTwoActions(
alertTitle: S.of(context).export_backup,
alertContent: S.of(context).save_backup_password,
rightButtonText: S.of(context).seed_alert_yes,
leftButtonText: S.of(context).seed_alert_back,
actionRightButton: () async {
Navigator.of(dialogContext).pop();
final backup = await backupViewModelBase.exportBackup();
if (backup == null) {
return;
}
if (backup == null) {
return;
}
if (Platform.isAndroid) {
onExportAndroid(context, backup);
} else if (Platform.isIOS) {
await share(backup, context);
} else {
await _saveFile(backup);
}
},
actionLeftButton: () => Navigator.of(dialogContext).pop());
});
if (Platform.isAndroid) {
onExportAndroid(context, backup);
} else if (Platform.isIOS) {
await share(backup, context);
} else {
await _saveFile(backup);
}
},
actionLeftButton: () => Navigator.of(dialogContext).pop(),
);
},
);
}
void onExportAndroid(BuildContext context, BackupExportFile backup) {
@ -137,8 +145,7 @@ class BackupPage extends BasePage {
rightButtonText: S.of(context).save_to_downloads,
leftButtonText: S.of(context).share,
actionRightButton: () async {
await backupViewModelBase.saveToDownload(
backup.name, backup.file);
await backupViewModelBase.saveToDownload(backup.name, backup.file);
Navigator.of(dialogContext).pop();
await showBar<void>(context, S.of(context).file_saved);
},
@ -151,15 +158,13 @@ class BackupPage extends BasePage {
Future<void> share(BackupExportFile backup, BuildContext context) async {
final path = await backupViewModelBase.saveBackupFileLocally(backup);
await ShareUtil.shareFile(
filePath: path, fileName: backup.name, context: context);
await ShareUtil.shareFile(filePath: path, fileName: backup.name, context: context);
await backupViewModelBase.removeBackupFileLocally(backup);
}
Future<void> _saveFile(BackupExportFile backup) async {
String? outputFile = await FilePicker.platform.saveFile(
dialogTitle: 'Save Your File to desired location',
fileName: backup.name);
String? outputFile = await FilePicker.platform
.saveFile(dialogTitle: 'Save Your File to desired location', fileName: backup.name);
try {
await backup.file.copy(outputFile!);

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:cake_wallet/generated/i18n.dart';
@ -6,14 +7,13 @@ import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/view_model/edit_backup_password_view_model.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
class EditBackupPasswordPage extends BasePage {
EditBackupPasswordPage(this.editBackupPasswordViewModel)
: textEditingController = TextEditingController() {
textEditingController.text = editBackupPasswordViewModel.backupPassword;
textEditingController.addListener(() => editBackupPasswordViewModel
.backupPassword = textEditingController.text);
textEditingController
.addListener(() => editBackupPasswordViewModel.backupPassword = textEditingController.text);
}
final EditBackupPasswordViewModel editBackupPasswordViewModel;
@ -25,34 +25,41 @@ class EditBackupPasswordPage extends BasePage {
@override
Widget body(BuildContext context) {
return Padding(
padding: EdgeInsets.only(left: 24, right: 24),
child: Stack(
fit: StackFit.expand,
children: [
Center(
child: Observer(
builder: (_) => TextFormField(
autofocus: true,
enableSuggestions: false,
autocorrect: false,
keyboardType: TextInputType.visiblePassword,
controller: textEditingController,
style: TextStyle(
fontSize: 26,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor)))),
Positioned(
child: Observer(
builder: (_) => PrimaryButton(
onPressed: () => onSave(context),
text: S.of(context).save,
color: Theme.of(context).primaryColor,
textColor: Colors.white,
isDisabled: !editBackupPasswordViewModel.canSave)),
bottom: 24,
left: 0,
right: 0)
],
));
padding: EdgeInsets.only(left: 24, right: 24),
child: Stack(
fit: StackFit.expand,
children: [
Center(
child: Observer(
builder: (_) => BaseTextFormField(
autofocus: true,
enableSuggestions: false,
autocorrect: false,
keyboardType: TextInputType.visiblePassword,
controller: textEditingController,
textStyle: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
),
),
Positioned(
child: Observer(
builder: (_) => PrimaryButton(
onPressed: () => onSave(context),
text: S.of(context).save,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
isDisabled: !editBackupPasswordViewModel.canSave,
),
),
bottom: 24,
left: 0,
right: 0,
)
],
),
);
}
void onSave(BuildContext context) {

View file

@ -1,9 +1,9 @@
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cake_wallet/themes/core/theme_store.dart';
import 'package:cake_wallet/utils/route_aware.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/src/widgets/nav_bar.dart';
import 'package:cake_wallet/generated/i18n.dart';
@ -14,8 +14,7 @@ abstract class BasePage extends StatelessWidget {
final GlobalKey<ScaffoldState> _scaffoldKey;
final Image closeButtonImage = Image.asset('assets/images/close_button.png');
final Image closeButtonImageDarkTheme =
Image.asset('assets/images/close_button_dark_theme.png');
final Image closeButtonImageDarkTheme = Image.asset('assets/images/close_button_dark_theme.png');
String? get title => null;
@ -45,30 +44,22 @@ abstract class BasePage extends StatelessWidget {
Widget Function(BuildContext, Widget)? get rootWrapper => null;
ThemeBase get currentTheme => getIt.get<SettingsStore>().currentTheme;
MaterialThemeBase get currentTheme => getIt.get<ThemeStore>().currentTheme;
void onOpenEndDrawer() => _scaffoldKey.currentState!.openEndDrawer();
void onClose(BuildContext context) => Navigator.of(context).pop();
Color pageBackgroundColor(BuildContext context) =>
(currentTheme.type == ThemeType.dark
? backgroundDarkColor
: backgroundLightColor) ??
(gradientBackground && currentTheme.type == ThemeType.bright
? Colors.transparent
: Theme.of(context).colorScheme.background);
(currentTheme.isDark ? backgroundDarkColor : backgroundLightColor) ??
(gradientBackground ? Colors.transparent : Theme.of(context).colorScheme.surface);
Color titleColor(BuildContext context) =>
(gradientBackground && currentTheme.type == ThemeType.bright) ||
(gradientAll && currentTheme.brightness == Brightness.light)
? Colors.white
: Theme.of(context).appBarTheme.titleTextStyle!.color!;
Color titleColor(BuildContext context) => Theme.of(context).colorScheme.onSurface;
Color? pageIconColor(BuildContext context) => titleColor(context);
Widget closeButton(BuildContext context) => Image.asset(
currentTheme.type == ThemeType.dark
currentTheme.isDark
? 'assets/images/close_button_dark_theme.png'
: 'assets/images/close_button.png',
color: pageIconColor(context),
@ -95,9 +86,9 @@ abstract class BasePage extends StatelessWidget {
child: Semantics(
label: S.of(context).seed_alert_back,
child: TextButton(
style: ButtonStyle(
overlayColor: MaterialStateColor.resolveWith(
(states) => Colors.transparent),
style: TextButton.styleFrom(
foregroundColor: Theme.of(context).colorScheme.onSurface,
overlayColor: WidgetStateColor.resolveWith((states) => Colors.transparent),
),
onPressed: () => onClose(context),
child: backButton(context),
@ -113,11 +104,11 @@ abstract class BasePage extends StatelessWidget {
? null
: Text(
title!,
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
fontFamily: 'Lato',
color: titleColor(context)),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
fontSize: 18.0,
fontWeight: FontWeight.w600,
color: titleColor(context),
),
);
}

View file

@ -14,12 +14,6 @@ import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/provider_optoin_tile.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/src/widgets/trail_button.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/src/screens/send/widgets/extract_address_from_parsed.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/view_model/buy/buy_sell_view_model.dart';
@ -43,17 +37,6 @@ class BuySellPage extends BasePage {
final _cryptoAddressFocus = FocusNode();
var _isReactionsSet = false;
final arrowBottomPurple = Image.asset(
'assets/images/arrow_bottom_purple_icon.png',
color: Colors.white,
height: 8,
);
final arrowBottomCakeGreen = Image.asset(
'assets/images/arrow_bottom_cake_green.png',
color: Colors.white,
height: 8,
);
late final String? depositWalletName;
late final String? receiveWalletName;
@ -95,11 +78,11 @@ class BuySellPage extends BasePage {
Widget? leading(BuildContext context) {
final _backButton = Icon(
Icons.arrow_back_ios,
color: titleColor(context),
color: Theme.of(context).colorScheme.onSurface,
size: 16,
);
final _closeButton =
currentTheme.type == ThemeType.dark ? closeButtonImageDarkTheme : closeButtonImage;
buySellViewModel.isDarkTheme ? closeButtonImageDarkTheme : closeButtonImage;
bool isMobileView = responsiveLayoutUtil.shouldRenderMobileUI;
@ -113,7 +96,7 @@ class BuySellPage extends BasePage {
label: !isMobileView ? S.of(context).close : S.of(context).seed_alert_back,
child: TextButton(
style: ButtonStyle(
overlayColor: MaterialStateColor.resolveWith((states) => Colors.transparent),
overlayColor: WidgetStateColor.resolveWith((states) => Colors.transparent),
),
onPressed: () => onClose(context),
child: !isMobileView ? _closeButton : _backButton,
@ -129,89 +112,94 @@ class BuySellPage extends BasePage {
WidgetsBinding.instance.addPostFrameCallback((_) => _setReactions(context, buySellViewModel));
return KeyboardActions(
disableScroll: true,
config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
nextFocus: false,
actions: [
KeyboardActionsItem(
focusNode: _fiatAmountFocus, toolbarButtons: [(_) => KeyboardDoneButton()]),
KeyboardActionsItem(
focusNode: _cryptoAmountFocus, toolbarButtons: [(_) => KeyboardDoneButton()])
]),
child: Container(
color: Theme.of(context).colorScheme.background,
child: Form(
key: _formKey,
child: ScrollableWithBottomSection(
contentPadding: EdgeInsets.only(bottom: 24),
content: Observer(
builder: (_) => Column(children: [
_exchangeCardsSection(context),
Padding(
padding: EdgeInsets.symmetric(horizontal: 24),
child: Column(
children: [
SizedBox(height: 12),
_buildPaymentMethodTile(context),
],
disableScroll: true,
config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context).colorScheme.surface,
nextFocus: false,
actions: [
KeyboardActionsItem(
focusNode: _fiatAmountFocus, toolbarButtons: [(_) => KeyboardDoneButton()]),
KeyboardActionsItem(
focusNode: _cryptoAmountFocus, toolbarButtons: [(_) => KeyboardDoneButton()])
]),
child: Container(
color: Theme.of(context).colorScheme.surface,
child: Form(
key: _formKey,
child: ScrollableWithBottomSection(
contentPadding: EdgeInsets.only(bottom: 24),
content: Observer(
builder: (_) => Column(
children: [
_exchangeCardsSection(context),
Padding(
padding: EdgeInsets.symmetric(horizontal: 24),
child: Column(
children: [
SizedBox(height: 12),
_buildPaymentMethodTile(context),
],
),
),
],
),
),
bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
bottomSection: Observer(
builder: (_) => Column(
children: [
if (buySellViewModel.isBuySellQuotFailed)
Padding(
padding: EdgeInsets.only(bottom: 15),
child: Row(
children: [
Expanded(
child: Container(
alignment: Alignment.centerRight,
child: Icon(
Icons.warning_amber_rounded,
color: Theme.of(context).colorScheme.error,
size: 26,
),
),
),
])),
bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
bottomSection: Observer(
builder: (_) => Column(children: [
buySellViewModel.isBuySellQuotFailed
? Padding(
padding: EdgeInsets.only(bottom: 15),
child: Row(
children: [
Expanded(
child: Container(
alignment: Alignment.centerRight,
child: Icon(Icons.warning_amber_rounded,
color: Theme.of(context)
.extension<ExchangePageTheme>()!
.receiveAmountColor,
size: 26),
),
Expanded(
flex: 8,
child: Text(
S.of(context).buy_sell_pair_is_not_supported_warning,
textAlign: TextAlign.center,
softWrap: true,
overflow: TextOverflow.ellipsis,
maxLines: 3,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.error,
fontWeight: FontWeight.w500,
),
),
Expanded(
flex: 8,
child: Text(
S.of(context).buy_sell_pair_is_not_supported_warning,
textAlign: TextAlign.center,
softWrap: true,
overflow: TextOverflow.ellipsis,
maxLines: 3,
style: TextStyle(
color: Theme.of(context)
.extension<ExchangePageTheme>()!
.receiveAmountColor,
fontWeight: FontWeight.w500,
fontSize: 12,
),
),
),
],
),
)
: Container(),
LoadingPrimaryButton(
text: S.current.choose_a_provider,
onPressed: () async {
if(!_formKey.currentState!.validate()) return;
buySellViewModel.onTapChoseProvider(context);
},
color: Theme.of(context).primaryColor,
textColor: Colors.white,
isDisabled: buySellViewModel.isBuySellQuotFailed,
isLoading: !buySellViewModel.isReadyToTrade &&
!buySellViewModel.isBuySellQuotFailed),
])),
)),
));
),
],
),
),
LoadingPrimaryButton(
text: S.current.choose_a_provider,
onPressed: () async {
if (!_formKey.currentState!.validate()) return;
buySellViewModel.onTapChoseProvider(context);
},
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
isDisabled: buySellViewModel.isBuySellQuotFailed,
isLoading:
!buySellViewModel.isReadyToTrade && !buySellViewModel.isBuySellQuotFailed,
),
],
),
),
),
),
),
);
}
Widget _buildPaymentMethodTile(BuildContext context) {
@ -230,21 +218,21 @@ class BuySellPage extends BasePage {
}
if (buySellViewModel.paymentMethodState is PaymentMethodLoaded &&
buySellViewModel.selectedPaymentMethod != null) {
return Observer(builder: (_) {
final selectedPaymentMethod = buySellViewModel.selectedPaymentMethod!;
return ProviderOptionTile(
lightImagePath: selectedPaymentMethod.lightIconPath,
darkImagePath: selectedPaymentMethod.darkIconPath,
title: selectedPaymentMethod.title,
onPressed: () => _pickPaymentMethod(context),
leadingIcon: Icons.arrow_forward_ios,
isLightMode: !buySellViewModel.isDarkTheme,
borderRadius: 30,
padding: EdgeInsets.symmetric(horizontal: 24, vertical: 8),
titleTextStyle:
textLargeBold(color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
);
});
final selectedPaymentMethod = buySellViewModel.selectedPaymentMethod!;
return ProviderOptionTile(
lightImagePath: selectedPaymentMethod.lightIconPath,
darkImagePath: selectedPaymentMethod.darkIconPath,
title: selectedPaymentMethod.title,
onPressed: () => _pickPaymentMethod(context),
leadingIcon: Icons.arrow_forward_ios,
isLightMode: !buySellViewModel.isDarkTheme,
borderRadius: 30,
padding: EdgeInsets.symmetric(horizontal: 24, vertical: 8),
titleTextStyle: Theme.of(context).textTheme.titleMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.w600,
),
);
}
return OptionTilePlaceholder(errorText: 'No payment methods available', borderRadius: 30);
}
@ -280,19 +268,17 @@ class BuySellPage extends BasePage {
_onCurrencyChange(buySellViewModel.fiatCurrency, buySellViewModel, fiatCurrencyKey);
reaction(
(_) => buySellViewModel.wallet.name,
(String _) =>
_onWalletNameChange(buySellViewModel, buySellViewModel.cryptoCurrency, cryptoCurrencyKey));
(_) => buySellViewModel.wallet.name,
(String _) => _onWalletNameChange(
buySellViewModel, buySellViewModel.cryptoCurrency, cryptoCurrencyKey));
reaction(
(_) => buySellViewModel.cryptoCurrency,
(CryptoCurrency currency) =>
_onCurrencyChange(currency, buySellViewModel, cryptoCurrencyKey));
reaction(
(_) => buySellViewModel.fiatCurrency,
(FiatCurrency currency) =>
_onCurrencyChange(currency, buySellViewModel, fiatCurrencyKey));
reaction((_) => buySellViewModel.fiatCurrency,
(FiatCurrency currency) => _onCurrencyChange(currency, buySellViewModel, fiatCurrencyKey));
reaction((_) => buySellViewModel.fiatAmount, (String amount) {
if (fiatCurrencyKey.currentState!.amountController.text != amount) {
@ -318,13 +304,13 @@ class BuySellPage extends BasePage {
fiatAmountController.addListener(() {
if (fiatAmountController.text != buySellViewModel.fiatAmount) {
buySellViewModel.changeFiatAmount(amount: fiatAmountController.text);
buySellViewModel.changeFiatAmount(amount: fiatAmountController.text);
}
});
cryptoAmountController.addListener(() {
if (cryptoAmountController.text != buySellViewModel.cryptoAmount) {
buySellViewModel.changeCryptoAmount(amount: cryptoAmountController.text);
buySellViewModel.changeCryptoAmount(amount: cryptoAmountController.text);
}
});
@ -336,7 +322,7 @@ class BuySellPage extends BasePage {
if (!_cryptoAddressFocus.hasFocus && cryptoAddressController.text.isNotEmpty) {
final domain = cryptoAddressController.text;
buySellViewModel.cryptoCurrencyAddress =
await fetchParsedAddress(context, domain, buySellViewModel.cryptoCurrency);
await fetchParsedAddress(context, domain, buySellViewModel.cryptoCurrency);
}
});
@ -365,15 +351,16 @@ class BuySellPage extends BasePage {
_isReactionsSet = true;
}
void _onCurrencyChange(Currency currency, BuySellViewModel buySellViewModel,
GlobalKey<ExchangeCardState> key) {
void _onCurrencyChange(
Currency currency, BuySellViewModel buySellViewModel, GlobalKey<ExchangeCardState> key) {
final isCurrentTypeWallet = currency == buySellViewModel.wallet.currency;
key.currentState!.changeSelectedCurrency(currency);
key.currentState!.changeWalletName(isCurrentTypeWallet ? buySellViewModel.wallet.name : '');
key.currentState!.changeAddress(
address: isCurrentTypeWallet ? buySellViewModel.wallet.walletAddresses.addressForExchange : '');
address:
isCurrentTypeWallet ? buySellViewModel.wallet.walletAddresses.addressForExchange : '');
key.currentState!.changeAmount(amount: '');
}
@ -384,7 +371,8 @@ class BuySellPage extends BasePage {
if (isCurrentTypeWallet) {
key.currentState!.changeWalletName(buySellViewModel.wallet.name);
key.currentState!.addressController.text = buySellViewModel.wallet.walletAddresses.addressForExchange;
key.currentState!.addressController.text =
buySellViewModel.wallet.walletAddresses.addressForExchange;
} else if (key.currentState!.addressController.text ==
buySellViewModel.wallet.walletAddresses.addressForExchange) {
key.currentState!.changeWalletName('');
@ -396,67 +384,77 @@ class BuySellPage extends BasePage {
Widget _exchangeCardsSection(BuildContext context) {
final fiatExchangeCard = Observer(
builder: (_) => ExchangeCard(
cardInstanceName: 'fiat_currency_trade_card',
onDispose: disposeBestRateSync,
amountFocusNode: _fiatAmountFocus,
key: fiatCurrencyKey,
title: 'FIAT ${S.of(context).amount}',
initialCurrency: buySellViewModel.fiatCurrency,
initialWalletName: '',
initialAddress: '',
initialIsAmountEditable: true,
isAmountEstimated: false,
currencyRowPadding: EdgeInsets.zero,
addressRowPadding: EdgeInsets.zero,
isMoneroWallet: buySellViewModel.wallet == WalletType.monero,
showAddressField: false,
showLimitsField: false,
currencies: buySellViewModel.fiatCurrencies,
onCurrencySelected: (currency) =>
buySellViewModel.changeFiatCurrency(currency: currency),
imageArrow: arrowBottomPurple,
currencyButtonColor: Colors.transparent,
addressButtonsColor:
Theme.of(context).extension<SendPageTheme>()!.textFieldButtonColor,
borderColor:
Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderTopPanelColor,
onPushPasteButton: (context) async {},
onPushAddressBookButton: (context) async {},
));
builder: (_) => ExchangeCard(
cardInstanceName: 'fiat_currency_trade_card',
onDispose: disposeBestRateSync,
amountFocusNode: _fiatAmountFocus,
key: fiatCurrencyKey,
title: 'FIAT ${S.of(context).amount}',
initialCurrency: buySellViewModel.fiatCurrency,
initialWalletName: '',
initialAddress: '',
initialIsAmountEditable: true,
isAmountEstimated: false,
currencyRowPadding: EdgeInsets.zero,
addressRowPadding: EdgeInsets.zero,
isMoneroWallet: buySellViewModel.wallet == WalletType.monero,
showAddressField: false,
showLimitsField: false,
currencies: buySellViewModel.fiatCurrencies,
onCurrencySelected: (currency) => buySellViewModel.changeFiatCurrency(currency: currency),
imageArrow: Image.asset(
'assets/images/arrow_bottom_purple_icon.png',
color: Theme.of(context).colorScheme.onSurface,
height: 8,
),
currencyButtonColor: Colors.transparent,
addressButtonsColor: Theme.of(context).colorScheme.surfaceContainerHighest,
borderColor: Theme.of(context).colorScheme.outlineVariant,
onPushPasteButton: (context) async {},
onPushAddressBookButton: (context) async {},
fillColor: buySellViewModel.isBuyAction
? Theme.of(context).colorScheme.surfaceContainer
: Theme.of(context).colorScheme.surfaceContainerLow,
),
);
final cryptoExchangeCard = Observer(
builder: (_) => ExchangeCard(
cardInstanceName: 'crypto_currency_trade_card',
onDispose: disposeBestRateSync,
amountFocusNode: _cryptoAmountFocus,
addressFocusNode: _cryptoAddressFocus,
key: cryptoCurrencyKey,
title: 'Crypto ${S.of(context).amount}',
initialCurrency: buySellViewModel.cryptoCurrency,
initialWalletName: '',
initialAddress: buySellViewModel.cryptoCurrency == buySellViewModel.wallet.currency
? buySellViewModel.wallet.walletAddresses.addressForExchange
: buySellViewModel.cryptoCurrencyAddress,
initialIsAmountEditable: true,
isAmountEstimated: true,
showLimitsField: false,
currencyRowPadding: EdgeInsets.zero,
addressRowPadding: EdgeInsets.zero,
isMoneroWallet: buySellViewModel.wallet == WalletType.monero,
currencies: buySellViewModel.cryptoCurrencies,
onCurrencySelected: (currency) =>
buySellViewModel.changeCryptoCurrency(currency: currency),
imageArrow: arrowBottomCakeGreen,
currencyButtonColor: Colors.transparent,
addressButtonsColor:
Theme.of(context).extension<SendPageTheme>()!.textFieldButtonColor,
borderColor:
Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderBottomPanelColor,
addressTextFieldValidator: AddressValidator(type: buySellViewModel.cryptoCurrency),
onPushPasteButton: (context) async {},
onPushAddressBookButton: (context) async {},
));
builder: (_) => ExchangeCard(
cardInstanceName: 'crypto_currency_trade_card',
onDispose: disposeBestRateSync,
amountFocusNode: _cryptoAmountFocus,
addressFocusNode: _cryptoAddressFocus,
key: cryptoCurrencyKey,
title: 'Crypto ${S.of(context).amount}',
initialCurrency: buySellViewModel.cryptoCurrency,
initialWalletName: '',
initialAddress: buySellViewModel.cryptoCurrency == buySellViewModel.wallet.currency
? buySellViewModel.wallet.walletAddresses.addressForExchange
: buySellViewModel.cryptoCurrencyAddress,
initialIsAmountEditable: true,
isAmountEstimated: true,
showLimitsField: false,
currencyRowPadding: EdgeInsets.zero,
addressRowPadding: EdgeInsets.zero,
isMoneroWallet: buySellViewModel.wallet == WalletType.monero,
currencies: buySellViewModel.cryptoCurrencies,
onCurrencySelected: (currency) => buySellViewModel.changeCryptoCurrency(currency: currency),
imageArrow: Image.asset(
'assets/images/arrow_bottom_cake_green.png',
color: Theme.of(context).colorScheme.onSurface,
height: 8,
),
currencyButtonColor: Colors.transparent,
addressButtonsColor: Theme.of(context).colorScheme.surfaceContainerHighest,
borderColor: Theme.of(context).colorScheme.outlineVariant,
addressTextFieldValidator: AddressValidator(type: buySellViewModel.cryptoCurrency),
onPushPasteButton: (context) async {},
onPushAddressBookButton: (context) async {},
fillColor: buySellViewModel.isBuyAction
? Theme.of(context).colorScheme.surfaceContainerLow
: Theme.of(context).colorScheme.surfaceContainer,
),
);
if (responsiveLayoutUtil.shouldRenderMobileUI) {
return Observer(

View file

@ -19,9 +19,6 @@ class BuyWebViewPage extends BasePage {
@override
String get title => S.current.buy;
@override
Color get backgroundDarkColor => Colors.white;
@override
Widget body(BuildContext context) =>
BuyWebViewPageBody(buyViewModel, ordersStore: ordersStore, url: url);

View file

@ -1,148 +0,0 @@
import 'package:cake_wallet/buy/buy_provider.dart';
import 'package:cw_core/crypto_currency.dart';
import 'package:cake_wallet/entities/fiat_currency.dart';
import 'package:cake_wallet/palette.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class BuyListItem extends StatelessWidget {
BuyListItem({
required this.selectedProvider,
required this.provider,
required this.sourceAmount,
required this.sourceCurrency,
required this.destAmount,
required this.destCurrency,
required this.achSourceAmount,
this.onTap
});
final BuyProvider? selectedProvider;
final BuyProvider provider;
final double sourceAmount;
final FiatCurrency sourceCurrency;
final double destAmount;
final CryptoCurrency destCurrency;
final double achSourceAmount;
final VoidCallback? onTap;
@override
Widget build(BuildContext context) {
final isSelected = selectedProvider?.providerDescription == provider.providerDescription;
final iconColor = isSelected ? Colors.white : Colors.black;
final providerIcon = Image.asset('assets/images/wyre-icon.png', width: 36, height: 36);
final backgroundColor = isSelected
? Palette.greyBlueCraiola
: Palette.shadowWhite;
final primaryTextColor = isSelected
? Colors.white
: Palette.darkGray;
final secondaryTextColor = isSelected
? Colors.white
: Palette.darkBlueCraiola;
return GestureDetector(
onTap: onTap,
child: Container(
padding: EdgeInsets.only(
left: 20,
top: 28,
bottom: 28,
right: 20
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(25)),
color: backgroundColor
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (providerIcon != null)
Padding(
padding: EdgeInsets.only(right: 10),
child: providerIcon),
Text(
provider.title,
style: TextStyle(
color: secondaryTextColor,
fontSize: 20,
fontWeight: FontWeight.bold),
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
if(achSourceAmount != null)...[
Text(
'${destAmount?.toString()} ${destCurrency.title}',
style: TextStyle(
color: secondaryTextColor,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Row(
children: [
Icon(
Icons.account_balance_outlined,
size: 12,
color: primaryTextColor,
),
SizedBox(width: 5),
Text(
'${achSourceAmount?.toString()} ${sourceCurrency.title}',
style: TextStyle(
color: primaryTextColor,
fontSize: 16,
fontWeight: FontWeight.bold),
),
],
),
SizedBox(height: 10),
],
Text(
'${destAmount?.toString()} ${destCurrency.title}',
style: TextStyle(
color: secondaryTextColor,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Row(
children: [
Icon(
CupertinoIcons.creditcard,
size: 12,
color: primaryTextColor,
),
SizedBox(width: 5),
Text(
'${sourceAmount?.toString()} ${sourceCurrency.title}',
style: TextStyle(
color: primaryTextColor,
fontSize: 16,
fontWeight: FontWeight.bold),
),
],
),
],
),
],
),
],
),
)
);
}
}

View file

@ -1,11 +1,9 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/cake_pay/widgets/cake_pay_tile.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/view_model/cake_pay/cake_pay_account_view_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
@ -15,8 +13,6 @@ class CakePayAccountPage extends BasePage {
final CakePayAccountViewModel cakePayAccountViewModel;
@override
Widget leading(BuildContext context) {
return MergeSemantics(
@ -29,7 +25,7 @@ class CakePayAccountPage extends BasePage {
label: S.of(context).seed_alert_back,
child: TextButton(
style: ButtonStyle(
overlayColor: MaterialStateColor.resolveWith(
overlayColor: WidgetStateColor.resolveWith(
(states) => Colors.transparent),
),
onPressed: () => Navigator.pop(context),
@ -45,8 +41,9 @@ class CakePayAccountPage extends BasePage {
Widget middle(BuildContext context) {
return Text(
S.current.account,
style: textMediumSemiBold(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.w600,
),
);
}
@ -59,15 +56,20 @@ class CakePayAccountPage extends BasePage {
children: [
SizedBox(height: 20),
Observer(
builder: (_) => Container(decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
builder: (_) => Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 1.0,
color:
Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor),
color: Theme.of(context).colorScheme.outlineVariant,
),
),
),
child: CakePayTile(
title: S.of(context).email_address,
subTitle: cakePayAccountViewModel.email
),
),
child: CakePayTile(title: S.of(context).email_address, subTitle: cakePayAccountViewModel.email)),
),
],
),
@ -75,8 +77,8 @@ class CakePayAccountPage extends BasePage {
bottomSection: Column(
children: [
PrimaryButton(
color: Theme.of(context).primaryColor,
textColor: Colors.white,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
text: S.of(context).logout,
onPressed: () {
cakePayAccountViewModel.logout();

View file

@ -1,14 +1,11 @@
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/cake_pay/cake_pay_states.dart';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/cake_pay/cake_pay_auth_view_model.dart';
@ -42,7 +39,7 @@ class CakePayVerifyOtpPage extends BasePage {
return Text(
S.current.verification,
style: textMediumSemiBold(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
color: Theme.of(context).colorScheme.onSurface,
),
);
}
@ -63,7 +60,7 @@ class CakePayVerifyOtpPage extends BasePage {
return KeyboardActions(
config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
keyboardBarColor: Theme.of(context).colorScheme.surface,
nextFocus: false,
actions: [
KeyboardActionsItem(
@ -73,7 +70,7 @@ class CakePayVerifyOtpPage extends BasePage {
]),
child: Container(
height: 0,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: ScrollableWithBottomSection(
contentPadding: EdgeInsets.all(24),
content: Column(
@ -88,7 +85,9 @@ class CakePayVerifyOtpPage extends BasePage {
SizedBox(height: 14),
Text(
S.of(context).fill_code,
style: TextStyle(color: Color(0xff7A93BA), fontSize: 12),
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
SizedBox(height: 34),
Row(
@ -100,7 +99,9 @@ class CakePayVerifyOtpPage extends BasePage {
onTap: () => _authViewModel.logIn(_email),
child: Text(
S.of(context).resend_code,
style: textSmallSemiBold(color: Palette.blueCraiola),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.primary,
),
),
),
],
@ -119,8 +120,8 @@ class CakePayVerifyOtpPage extends BasePage {
onPressed: _verify,
isDisabled: _authViewModel.otpState is CakePayOtpSendDisabled,
isLoading: _authViewModel.otpState is CakePayOtpValidating,
color: Theme.of(context).primaryColor,
textColor: Colors.white,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
),
),
SizedBox(height: 20),
@ -145,8 +146,7 @@ class CakePayVerifyOtpPage extends BasePage {
});
}
void _onOtpSuccessful(BuildContext context) =>
Navigator.pop(context);
void _onOtpSuccessful(BuildContext context) => Navigator.pop(context);
void _verify() async => await _authViewModel.verifyEmail(_codeController.text);
}

View file

@ -7,7 +7,6 @@ import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/cake_pay/cake_pay_auth_view_model.dart';
@ -34,7 +33,7 @@ class CakePayWelcomePage extends BasePage {
return Text(
S.current.welcome_to_cakepay,
style: textMediumSemiBold(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
color: Theme.of(context).colorScheme.onSurface,
),
);
}
@ -68,12 +67,12 @@ class CakePayWelcomePage extends BasePage {
Text(
S.of(context).about_cake_pay,
style: textLarge(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
color: Theme.of(context).colorScheme.onSurface,
),
),
SizedBox(height: 20),
Text(S.of(context).cake_pay_account_note,
style: textLarge(color: Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
style: textLarge(color: Theme.of(context).colorScheme.onSurface)),
],
),
bottomSectionPadding: EdgeInsets.symmetric(vertical: 36, horizontal: 24),
@ -88,8 +87,8 @@ class CakePayWelcomePage extends BasePage {
onPressed: _login,
isLoading:
_authViewModel.userVerificationState is CakePayUserVerificationStateLoading,
color: Theme.of(context).primaryColor,
textColor: Colors.white,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
),
),
SizedBox(

View file

@ -15,9 +15,6 @@ import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
import 'package:cake_wallet/src/widgets/number_text_fild_widget.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
@ -60,11 +57,10 @@ class CakePayBuyCardPage extends BasePage {
title,
textAlign: TextAlign.center,
maxLines: 2,
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
fontFamily: 'Lato',
color: titleColor(context)),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.w600,
),
);
}
@ -82,7 +78,7 @@ class CakePayBuyCardPage extends BasePage {
disableScroll: true,
config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
keyboardBarColor: Theme.of(context).colorScheme.surface,
nextFocus: false,
actions: [
KeyboardActionsItem(
@ -91,7 +87,7 @@ class CakePayBuyCardPage extends BasePage {
),
]),
child: Container(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: ScrollableWithBottomSection(
contentPadding: EdgeInsets.zero,
content: Column(
@ -103,8 +99,8 @@ class CakePayBuyCardPage extends BasePage {
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Theme.of(context).extension<SendPageTheme>()!.firstGradientColor,
Theme.of(context).extension<SendPageTheme>()!.secondGradientColor,
Theme.of(context).colorScheme.primary,
Theme.of(context).colorScheme.secondary,
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
@ -145,12 +141,13 @@ class CakePayBuyCardPage extends BasePage {
children: [
SizedBox(height: 24),
Expanded(
child: Text(S.of(context).enter_amount,
style: TextStyle(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
fontSize: 24,
fontWeight: FontWeight.w600,
)),
child: Text(
S.of(context).enter_amount,
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
fontSize: 24,
fontWeight: FontWeight.w600,
),
),
),
card.denominations.isNotEmpty
? Expanded(
@ -187,16 +184,22 @@ class CakePayBuyCardPage extends BasePage {
padding: const EdgeInsets.only(bottom: 8.0),
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
color: Theme.of(context).colorScheme.primary,
borderRadius: BorderRadius.circular(10),
border: Border.all(color: Colors.white.withOpacity(0.20)),
border: Border.all(
color:
Theme.of(context).colorScheme.onPrimary.withOpacity(0.20),
),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
vendor.cakeWarnings!,
textAlign: TextAlign.center,
style: textSmallSemiBold(color: Colors.white),
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(context).colorScheme.onPrimary,
fontWeight: FontWeight.w600,
),
),
),
),
@ -205,13 +208,10 @@ class CakePayBuyCardPage extends BasePage {
child: SingleChildScrollView(
child: ClickableLinksText(
text: card.description ?? '',
textStyle: TextStyle(
color: Theme.of(context)
.extension<CakeTextTheme>()!
.secondaryTextColor,
fontSize: 18,
fontWeight: FontWeight.w400,
),
textStyle: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
fontSize: 18,
),
),
),
),
@ -235,8 +235,8 @@ class CakePayBuyCardPage extends BasePage {
: navigateToCakePayBuyCardDetailPage(context, card),
text: S.of(context).buy_now,
isDisabled: !cakePayBuyCardViewModel.isEnablePurchase,
color: Theme.of(context).primaryColor,
textColor: Colors.white,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
),
);
}),
@ -358,8 +358,7 @@ class _DenominationsAmountWidget extends StatelessWidget {
items: denominations,
itemPrefix: fiatCurrency,
selectedItem: denominations.first,
textStyle: textMediumSemiBold(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
textStyle: textMediumSemiBold(color: Theme.of(context).colorScheme.onSurface),
onItemSelected: (value) {
amountController.text = value;
onAmountChanged(value);
@ -374,14 +373,12 @@ class _DenominationsAmountWidget extends StatelessWidget {
decoration: BoxDecoration(
border: Border(
top: BorderSide(
width: 1.0,
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor),
width: 1.0, color: Theme.of(context).colorScheme.onSurfaceVariant),
),
),
child: Text(S.of(context).choose_card_value + ':',
maxLines: 2,
style: textSmall(
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor)),
style: textSmall(color: Theme.of(context).colorScheme.onSurfaceVariant)),
),
),
],
@ -408,14 +405,12 @@ class _DenominationsAmountWidget extends StatelessWidget {
decoration: BoxDecoration(
border: Border(
top: BorderSide(
width: 1.0,
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor),
width: 1.0, color: Theme.of(context).colorScheme.onSurfaceVariant),
),
),
child: Text(S.of(context).quantity + ':',
maxLines: 1,
style: textSmall(
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor)),
style: textSmall(color: Theme.of(context).colorScheme.onSurfaceVariant)),
),
),
],
@ -434,8 +429,7 @@ class _DenominationsAmountWidget extends StatelessWidget {
'$fiatCurrency ${cakePayBuyCardViewModel.totalAmount}',
maxLines: 1,
style: textMediumSemiBold(
color:
Theme.of(context).extension<CakeTextTheme>()!.titleColor)))),
color: Theme.of(context).colorScheme.onSurface)))),
),
const SizedBox(height: 4),
Expanded(
@ -444,16 +438,12 @@ class _DenominationsAmountWidget extends StatelessWidget {
decoration: BoxDecoration(
border: Border(
top: BorderSide(
width: 1.0,
color:
Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor),
width: 1.0, color: Theme.of(context).colorScheme.onSurfaceVariant),
),
),
child: Text(S.of(context).total + ':',
maxLines: 1,
style: textSmall(
color:
Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor)),
style: textSmall(color: Theme.of(context).colorScheme.onSurfaceVariant)),
),
),
],
@ -487,9 +477,7 @@ class _EnterAmountWidget extends StatelessWidget {
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 1.0,
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor),
bottom: BorderSide(width: 1.0, color: Theme.of(context).colorScheme.onSurfaceVariant),
),
),
child: BaseTextFormField(
@ -497,19 +485,16 @@ class _EnterAmountWidget extends StatelessWidget {
keyboardType: TextInputType.numberWithOptions(signed: false, decimal: true),
hintText: '0.00',
maxLines: null,
borderColor: Colors.transparent,
prefixIcon: Padding(
padding: const EdgeInsets.only(top: 12),
child: Text(
'$fiatCurrency: ',
style: textMediumSemiBold(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
style: textMediumSemiBold(color: Theme.of(context).colorScheme.onSurface),
),
),
textStyle:
textMediumSemiBold(color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
placeholderTextStyle: textMediumSemiBold(
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor),
textStyle: textMediumSemiBold(color: Theme.of(context).colorScheme.onSurface),
placeholderTextStyle:
textMediumSemiBold(color: Theme.of(context).colorScheme.onSurfaceVariant),
inputFormatters: [
FilteringTextInputFormatter.deny(RegExp('[\-|\ ]')),
FilteringTextInputFormatter.allow(
@ -523,11 +508,9 @@ class _EnterAmountWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(S.of(context).min_amount(minValue) + ' $fiatCurrency',
style: textSmall(
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor)),
style: textSmall(color: Theme.of(context).colorScheme.onSurfaceVariant)),
Text(S.of(context).max_amount(maxValue) + ' $fiatCurrency',
style: textSmall(
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor)),
style: textSmall(color: Theme.of(context).colorScheme.onSurfaceVariant)),
],
),
],

View file

@ -7,14 +7,10 @@ import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/cake_pay/widgets/card_item.dart';
import 'package:cake_wallet/src/screens/cake_pay/widgets/card_menu.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/filter_widget.dart';
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/src/widgets/cake_scrollbar.dart';
import 'package:cake_wallet/src/widgets/gradient_background.dart';
import 'package:cake_wallet/src/widgets/picker.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/utils/debounce.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
@ -60,7 +56,7 @@ class CakePayCardsPage extends BasePage {
return Text(
'Cake Pay',
style: textMediumSemiBold(
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
color: Theme.of(context).colorScheme.onSurface,
),
);
}
@ -68,66 +64,70 @@ class CakePayCardsPage extends BasePage {
@override
Widget trailing(BuildContext context) {
return _TrailingIcon(
asset: 'assets/images/profile.png',
iconColor: pageIconColor(context) ?? Colors.white,
onPressed: () {
_cardsListViewModel.isCakePayUserAuthenticated().then((value) {
asset: 'assets/images/profile.png',
iconColor: Theme.of(context).colorScheme.onSurface,
onPressed: () {
_cardsListViewModel.isCakePayUserAuthenticated().then(
(value) {
if (value) {
Navigator.pushNamed(context, Routes.cakePayAccountPage);
return;
}
Navigator.pushNamed(context, Routes.cakePayWelcomePage);
});
});
},
);
},
);
}
@override
Widget body(BuildContext context) {
if (_cardsListViewModel.settingsStore.selectedCakePayCountry == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
reaction((_) => _cardsListViewModel.shouldShowCountryPicker, (bool shouldShowCountryPicker) async {
if (shouldShowCountryPicker) {
_cardsListViewModel.storeInitialFilterStates();
await showCountryPicker(context, _cardsListViewModel);
if (_cardsListViewModel.hasFiltersChanged) {
_cardsListViewModel.resetLoadingNextPageState();
_cardsListViewModel.getVendors();
WidgetsBinding.instance.addPostFrameCallback((_) {
reaction((_) => _cardsListViewModel.shouldShowCountryPicker,
(bool shouldShowCountryPicker) async {
if (shouldShowCountryPicker) {
_cardsListViewModel.storeInitialFilterStates();
await showCountryPicker(context, _cardsListViewModel);
if (_cardsListViewModel.hasFiltersChanged) {
_cardsListViewModel.resetLoadingNextPageState();
_cardsListViewModel.getVendors();
}
_cardsListViewModel.settingsStore.selectedCakePayCountry =
_cardsListViewModel.selectedCountry;
}
_cardsListViewModel.settingsStore.selectedCakePayCountry =
_cardsListViewModel.selectedCountry;
}
});
});
});
}
final filterButton = Semantics(
label: S.of(context).filter_by,
child: GestureDetector(
onTap: () async {
_cardsListViewModel.storeInitialFilterStates();
await showFilterWidget(context);
if (_cardsListViewModel.hasFiltersChanged) {
_cardsListViewModel.resetLoadingNextPageState();
_cardsListViewModel.getVendors();
}
},
child: Container(
width: 32,
padding: EdgeInsets.only(top: 7, bottom: 7),
decoration: BoxDecoration(
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
border: Border.all(
color: Colors.transparent,
),
borderRadius: BorderRadius.circular(10),
),
child: Image.asset(
'assets/images/filter_icon.png',
color: Theme.of(context).extension<FilterTheme>()!.iconColor,
))),
onTap: () async {
_cardsListViewModel.storeInitialFilterStates();
await showFilterWidget(context);
if (_cardsListViewModel.hasFiltersChanged) {
_cardsListViewModel.resetLoadingNextPageState();
_cardsListViewModel.getVendors();
}
},
child: Container(
width: 32,
padding: EdgeInsets.only(top: 7, bottom: 7),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
border: Border.all(
color: Colors.transparent,
),
borderRadius: BorderRadius.circular(10),
),
child: Image.asset(
'assets/images/filter_icon.png',
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
),
);
final _countryPicker = Semantics(
label: S.of(context).filter_by,
@ -143,7 +143,7 @@ class CakePayCardsPage extends BasePage {
child: Container(
padding: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
color: Theme.of(context).colorScheme.surface,
border: Border.all(color: Colors.transparent),
borderRadius: BorderRadius.circular(10),
),
@ -163,11 +163,10 @@ class CakePayCardsPage extends BasePage {
SizedBox(width: 6),
Text(
_cardsListViewModel.selectedCountry.countryCode,
style: TextStyle(
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
fontSize: 16,
fontWeight: FontWeight.w700,
),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 16,
fontWeight: FontWeight.w700,
),
),
],
),
@ -177,25 +176,32 @@ class CakePayCardsPage extends BasePage {
);
return Padding(
padding: const EdgeInsets.all(14.0),
child: Column(children: [
padding: const EdgeInsets.all(14.0),
child: Column(
children: [
Container(
padding: EdgeInsets.only(left: 2, right: 22),
height: 32,
child: Row(children: [
padding: EdgeInsets.only(left: 2, right: 22),
height: 32,
child: Row(
children: [
Expanded(
child: _SearchWidget(
controller: _searchController,
focusNode: searchFocusNode,
)),
child: _SearchWidget(
controller: _searchController,
focusNode: searchFocusNode,
),
),
SizedBox(width: 5),
filterButton,
SizedBox(width: 5),
_countryPicker
])),
],
),
),
SizedBox(height: 8),
Expanded(child: CakePayCardsPageBody(cardsListViewModel: _cardsListViewModel))
]));
],
),
);
}
Future<void> showFilterWidget(BuildContext context) async {
@ -208,26 +214,25 @@ class CakePayCardsPage extends BasePage {
}
}
Future<void> showCountryPicker(BuildContext context, CakePayCardsListViewModel cardsListViewModel) async {
Future<void> showCountryPicker(
BuildContext context, CakePayCardsListViewModel cardsListViewModel) async {
await showPopUp<void>(
context: context,
builder: (_) => Picker(
title: S.of(context).select_your_country,
title: S.of(context).select_your_country,
items: cardsListViewModel.availableCountries,
images: cardsListViewModel.availableCountries
.map((e) => Image.asset(
e.iconPath,
errorBuilder: (context, error, stackTrace) => Container(
width: 58,
height: 58,
),
))
e.iconPath,
errorBuilder: (context, error, stackTrace) => Container(
width: 58,
height: 58,
),
))
.toList(),
selectedAtIndex: cardsListViewModel.availableCountries
.indexOf(cardsListViewModel.selectedCountry),
onItemSelected: (Country country) =>
cardsListViewModel.setSelectedCountry(country),
selectedAtIndex:
cardsListViewModel.availableCountries.indexOf(cardsListViewModel.selectedCountry),
onItemSelected: (Country country) => cardsListViewModel.setSelectedCountry(country),
isSeparated: false,
hintText: S.of(context).search,
matchingCriteria: (Country country, String searchText) =>
@ -310,10 +315,9 @@ class _CakePayCardsPageBodyState extends State<CakePayCardsPageBody> {
},
title: vendor.name,
subTitle: vendor.card?.description ?? '',
backgroundColor:
Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
titleColor: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
subtitleColor: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor,
backgroundColor: Theme.of(context).colorScheme.surface,
titleColor: Theme.of(context).colorScheme.onSurface,
subtitleColor: Theme.of(context).colorScheme.onSecondary,
discount: 0.0,
);
},
@ -324,10 +328,8 @@ class _CakePayCardsPageBodyState extends State<CakePayCardsPageBody> {
thumbHeight: thumbHeight,
rightOffset: 1,
width: 3,
backgroundColor:
Theme.of(context).extension<FilterTheme>()!.iconColor.withOpacity(0.05),
thumbColor:
Theme.of(context).extension<FilterTheme>()!.iconColor.withOpacity(0.5),
backgroundColor: Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.05),
thumbColor: Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.5),
fromTop: widget.cardsListViewModel.scrollOffsetFromTop,
)
: Offstage()
@ -343,9 +345,8 @@ class _VendorLoadedIndicator extends StatelessWidget {
Widget build(BuildContext context) {
return Center(
child: CircularProgressIndicator(
backgroundColor: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
valueColor: AlwaysStoppedAnimation<Color>(
Theme.of(context).extension<ExchangePageTheme>()!.firstGradientBottomPanelColor),
backgroundColor: Theme.of(context).colorScheme.onSurface,
valueColor: AlwaysStoppedAnimation<Color>(Theme.of(context).colorScheme.primary),
),
);
}
@ -362,41 +363,23 @@ class _SearchWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
final searchIcon = ExcludeSemantics(
child: Icon( Icons.search,
color: Theme.of(context).extension<FilterTheme>()!.iconColor,
//size: 24
),
);
return TextField(
return BaseTextFormField(
focusNode: focusNode,
style: TextStyle(color: Theme.of(context).extension<DashboardPageTheme>()!.textColor),
textStyle: Theme.of(context).textTheme.bodyMedium,
controller: controller,
decoration: InputDecoration(
filled: true,
contentPadding: EdgeInsets.only(
top: 8,
left: 8,
contentPadding: EdgeInsets.only(top: 8, left: 8),
hintText: S.of(context).search,
placeholderTextStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
fillColor: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
hintText: S.of(context).search,
hintStyle: TextStyle(
color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor,
),
alignLabelWithHint: true,
floatingLabelBehavior: FloatingLabelBehavior.never,
suffixIcon: searchIcon,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.transparent,
),
borderRadius: BorderRadius.circular(10),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white.withOpacity(0.2)),
borderRadius: BorderRadius.circular(10),
)),
alignLabelWithHint: true,
floatingLabelBehavior: FloatingLabelBehavior.never,
suffixIcon: ExcludeSemantics(
child: Icon(
Icons.search,
color: Theme.of(context).colorScheme.primary,
),
),
);
}
}

View file

@ -1,6 +1,6 @@
import 'package:cake_wallet/cake_pay/cake_pay_card.dart';
import 'package:cake_wallet/core/execution_state.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/cake_pay/cake_pay_card.dart';
import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/cake_pay/widgets/cake_pay_alert_modal.dart';
@ -15,10 +15,6 @@ import 'package:cake_wallet/src/widgets/bottom_sheet/info_bottom_sheet_widget.da
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/src/widgets/standard_checkbox.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/cake_pay/cake_pay_purchase_view_model.dart';
import 'package:cake_wallet/view_model/send/send_view_model_state.dart';
@ -42,11 +38,10 @@ class CakePayBuyCardDetailPage extends BasePage {
title,
textAlign: TextAlign.center,
maxLines: 2,
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
fontFamily: 'Lato',
color: titleColor(context)),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.bold,
),
);
}
@ -72,9 +67,11 @@ class CakePayBuyCardDetailPage extends BasePage {
BorderRadius.horizontal(left: Radius.circular(20), right: Radius.circular(20)),
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).extension<PickerTheme>()!.searchBackgroundFillColor,
color: Theme.of(context).colorScheme.surfaceContainerLowest,
borderRadius: BorderRadius.circular(20),
border: Border.all(color: Colors.white.withOpacity(0.20)),
border: Border.all(
color: Theme.of(context).colorScheme.outline.withOpacity(0.20),
),
),
child: Row(
children: [
@ -104,16 +101,16 @@ class CakePayBuyCardDetailPage extends BasePage {
children: [
Text(
S.of(context).value + ':',
style: textLarge(
color:
Theme.of(context).extension<CakeTextTheme>()!.titleColor),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
SizedBox(width: 8),
Text(
'${cakePayPurchaseViewModel.amount.toStringAsFixed(2)} ${cakePayPurchaseViewModel.fiatCurrency}',
style: textLarge(
color:
Theme.of(context).extension<CakeTextTheme>()!.titleColor),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
],
),
@ -122,16 +119,16 @@ class CakePayBuyCardDetailPage extends BasePage {
children: [
Text(
S.of(context).quantity + ':',
style: textLarge(
color:
Theme.of(context).extension<CakeTextTheme>()!.titleColor),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
SizedBox(width: 8),
Text(
'${cakePayPurchaseViewModel.quantity}',
style: textLarge(
color:
Theme.of(context).extension<CakeTextTheme>()!.titleColor),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
],
),
@ -140,16 +137,16 @@ class CakePayBuyCardDetailPage extends BasePage {
children: [
Text(
S.of(context).total + ':',
style: textLarge(
color:
Theme.of(context).extension<CakeTextTheme>()!.titleColor),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
SizedBox(width: 8),
Text(
'${cakePayPurchaseViewModel.totalAmount.toStringAsFixed(2)} ${cakePayPurchaseViewModel.fiatCurrency}',
style: textLarge(
color:
Theme.of(context).extension<CakeTextTheme>()!.titleColor),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
],
),
@ -176,15 +173,17 @@ class CakePayBuyCardDetailPage extends BasePage {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(S.of(context).expiry_and_validity + ':',
style: textMediumSemiBold(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.w600,
)),
SizedBox(height: 10),
Container(
width: double.infinity,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
color: Theme.of(context).colorScheme.outline.withOpacity(0.20),
width: 1,
),
),
@ -193,9 +192,9 @@ class CakePayBuyCardDetailPage extends BasePage {
padding: const EdgeInsets.only(bottom: 8.0),
child: Text(
card.expiryAndValidity ?? '',
style: textMedium(
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
),
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
),
),
@ -216,18 +215,21 @@ class CakePayBuyCardDetailPage extends BasePage {
cakePayPurchaseViewModel.sendViewModel.state is IsExecutingState,
onPressed: () => confirmPurchaseFirst(context),
text: S.of(context).purchase_gift_card,
color: Theme.of(context).primaryColor,
textColor: Colors.white,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
);
}),
),
SizedBox(height: 8),
InkWell(
onTap: () => _showTermsAndCondition(context, card.termsAndConditions),
child: Text(S.of(context).settings_terms_and_conditions,
style: textMediumSemiBold(
color: Theme.of(context).primaryColor,
).copyWith(fontSize: 12)),
child: Text(
S.of(context).settings_terms_and_conditions,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(context).colorScheme.primary,
fontWeight: FontWeight.w600,
),
),
),
SizedBox(height: 16)
],
@ -245,11 +247,14 @@ class CakePayBuyCardDetailPage extends BasePage {
alignment: Alignment.bottomLeft,
child: ClickableLinksText(
text: termsAndConditions ?? '',
textStyle: TextStyle(
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
fontSize: 18,
fontWeight: FontWeight.w400,
),
textStyle: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
fontSize: 18,
) ??
Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
fontSize: 18,
),
),
),
actionTitle: S.of(context).agree,
@ -311,9 +316,8 @@ class CakePayBuyCardDetailPage extends BasePage {
} catch (_) {
await cakePayPurchaseViewModel.cakePayService.logout();
}
}
cakePayPurchaseViewModel.isPurchasing = false;
}
cakePayPurchaseViewModel.isPurchasing = false;
}
void _showHowToUseCard(
@ -330,23 +334,27 @@ class CakePayBuyCardDetailPage extends BasePage {
padding: EdgeInsets.all(10),
child: Text(
card.name,
style: textLargeSemiBold(
color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor,
),
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.w600,
),
)),
ClickableLinksText(
text: card.howToUse ?? '',
textStyle: TextStyle(
color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
fontSize: 18,
fontWeight: FontWeight.w400,
),
linkStyle: TextStyle(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
fontSize: 18,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w400,
),
textStyle: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
) ??
Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
linkStyle: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontStyle: FontStyle.italic,
) ??
Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontStyle: FontStyle.italic,
),
),
]),
actionTitle: S.current.got_it,
@ -390,10 +398,12 @@ class CakePayBuyCardDetailPage extends BasePage {
currency: cakePayPurchaseViewModel.sendViewModel.selectedCryptoCurrency,
amount: S.of(popupContext).send_amount,
amountValue: cakePayPurchaseViewModel.sendViewModel.pendingTransaction!.amountFormatted,
fiatAmountValue: cakePayPurchaseViewModel.sendViewModel.pendingTransactionFiatAmountFormatted,
fiatAmountValue:
cakePayPurchaseViewModel.sendViewModel.pendingTransactionFiatAmountFormatted,
fee: S.of(popupContext).send_fee,
feeValue: cakePayPurchaseViewModel.sendViewModel.pendingTransaction!.feeFormatted,
feeFiatAmount: cakePayPurchaseViewModel.sendViewModel.pendingTransactionFeeFiatAmountFormatted,
feeFiatAmount:
cakePayPurchaseViewModel.sendViewModel.pendingTransactionFeeFiatAmountFormatted,
outputs: cakePayPurchaseViewModel.sendViewModel.outputs,
onSlideComplete: () async {
Navigator.of(popupContext).pop();
@ -532,19 +542,15 @@ class ThreeCheckboxAlert extends BaseAlertDialog {
@override
String get titleText => alertTitle;
@override
bool get isDividerExists => true;
@override
String get leftActionButtonText => leftButtonText;
@override
String get rightActionButtonText => rightButtonText;
@override
VoidCallback get actionLeft => actionLeftButton;
@override
VoidCallback get actionRight => () {
actionRightButton(checkbox1, checkbox2, checkbox3);
@ -669,14 +675,12 @@ class _ThreeCheckboxAlertContentState extends State<ThreeCheckboxAlertContent> {
padding: const EdgeInsets.only(top: 8.0),
child: Text(
S.of(context).settings_terms_and_conditions,
style: TextStyle(
fontSize: 16,
fontFamily: 'Lato',
fontWeight: FontWeight.w400,
color: Theme.of(context).primaryColor,
decoration: TextDecoration.none,
height: 1,
),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 16,
color: Theme.of(context).colorScheme.primary,
decoration: TextDecoration.none,
height: 1,
),
softWrap: true,
),
),
@ -686,13 +690,10 @@ class _ThreeCheckboxAlertContentState extends State<ThreeCheckboxAlertContent> {
padding: const EdgeInsets.only(top: 8.0),
child: Text(
'Please confirm all checkboxes',
style: TextStyle(
color: Colors.red,
fontSize: 14,
fontFamily: 'Lato',
fontWeight: FontWeight.w400,
decoration: TextDecoration.none,
),
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.errorContainer,
decoration: TextDecoration.none,
),
),
),
],

View file

@ -1,8 +1,5 @@
import 'package:cake_wallet/src/widgets/alert_background.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart';
import 'package:cake_wallet/typography.dart';
import 'package:flutter/material.dart';
class CakePayAlertModal extends StatelessWidget {
@ -34,7 +31,7 @@ class CakePayAlertModal extends StatelessWidget {
padding: EdgeInsets.only(top: 24, left: 24, right: 24),
margin: EdgeInsets.all(24),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(30),
),
child: Column(
@ -42,8 +39,9 @@ class CakePayAlertModal extends StatelessWidget {
if (title.isNotEmpty)
Text(
title,
style: textLargeSemiBold(
color: Theme.of(context).extension<CakeScrollbarTheme>()!.thumbColor,
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.bold,
),
),
Container(
@ -58,9 +56,8 @@ class CakePayAlertModal extends StatelessWidget {
PrimaryButton(
onPressed: () => Navigator.pop(context),
text: actionTitle,
color: Theme.of(context).cardColor,
textColor:
Theme.of(context).extension<CakeTextTheme>()!.titleColor,
color: Theme.of(context).colorScheme.surfaceContainer,
textColor: Theme.of(context).colorScheme.primary,
),
SizedBox(height: 21),
],
@ -75,9 +72,9 @@ class CakePayAlertModal extends StatelessWidget {
child: CircleAvatar(
child: Icon(
Icons.close,
color: Colors.black,
color: Theme.of(context).colorScheme.onSurface,
),
backgroundColor: Colors.white,
backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
),
),
)

View file

@ -1,7 +1,4 @@
import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
class CakePayTile extends StatelessWidget {
const CakePayTile({
@ -17,30 +14,34 @@ class CakePayTile extends StatelessWidget {
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
return GestureDetector(
onTap: onTap,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: textXSmall(
color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: colorScheme.onSurfaceVariant,
),
),
),
SizedBox(height: 8),
Text(
subTitle,
style: textMediumBold(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
SizedBox(height: 8),
Text(
subTitle,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
color: colorScheme.onSurface,
fontWeight: FontWeight.w600,
),
),
),
],
)
],
));
],
)
],
),
);
}
}

View file

@ -44,7 +44,9 @@ class CardItem extends StatelessWidget {
borderRadius: BorderRadius.circular(10),
border: hideBorder
? Border.all(color: Colors.transparent)
: Border.all(color: Colors.white.withOpacity(0.20)),
: Border.all(
color: Theme.of(context).colorScheme.outlineVariant.withOpacity(0.20),
),
),
child: Row(
children: [
@ -75,7 +77,7 @@ class CardItem extends StatelessWidget {
title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: titleColor,
fontSize: 18,
fontWeight: FontWeight.w700,
@ -85,7 +87,7 @@ class CardItem extends StatelessWidget {
subTitle,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: titleColor,
fontSize: 10,
fontWeight: FontWeight.w700,

View file

@ -13,15 +13,14 @@ class CakePayCardImagePlaceholder extends StatelessWidget {
child: Center(
child: Text(
text ?? 'Image not found!',
style: TextStyle(
color: Colors.black,
fontSize: 12,
fontWeight: FontWeight.w900,
),
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.w900,
),
),
),
decoration: BoxDecoration(
color: Colors.white,
color: Theme.of(context).colorScheme.surfaceContainer,
),
),
);

View file

@ -29,11 +29,10 @@ class ClickableLinksText extends StatelessWidget {
spans.add(
TextSpan(
text: url,
style: TextStyle(
color: Colors.blue,
fontSize: 18,
fontWeight: FontWeight.w400,
),
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.primary,
fontSize: 18,
),
recognizer: TapGestureRecognizer()
..onTap = () async {
if (await canLaunchUrl(Uri.parse(url))) {

View file

@ -15,11 +15,11 @@ class RoundedCheckbox extends StatelessWidget {
width: 20.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(50.0)),
color: Theme.of(context).primaryColor,
color: Theme.of(context).colorScheme.primary,
),
child: Icon(
Icons.check,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
size: 14.0,
))
: Offstage();

View file

@ -1,5 +1,3 @@
import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart';
class TextIconButton extends StatelessWidget {
@ -14,24 +12,24 @@ class TextIconButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return
InkWell(
onTap: onTap,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
label,
style: textMediumSemiBold(
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
),
),
Icon(
Icons.chevron_right_rounded,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
),
],
),
return InkWell(
onTap: onTap,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
label,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.w600,
),
),
Icon(
Icons.chevron_right_rounded,
color: Theme.of(context).colorScheme.onSurface,
),
],
),
);
}
}

View file

@ -6,8 +6,6 @@ import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/connect_device/widgets/device_tile.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart';
import 'package:cw_core/utils/print_verbose.dart';
@ -195,12 +193,7 @@ class ConnectDevicePageBodyState extends State<ConnectDevicePageBody> {
Platform.isIOS
? S.of(context).connect_your_hardware_wallet_ios
: S.of(context).connect_your_hardware_wallet,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.extension<CakeTextTheme>()!
.titleColor),
style: Theme.of(context).textTheme.titleMedium,
textAlign: TextAlign.center,
),
),
@ -210,12 +203,7 @@ class ConnectDevicePageBodyState extends State<ConnectDevicePageBody> {
padding: EdgeInsets.only(left: 20, right: 20, bottom: 20),
child: Text(
S.of(context).if_you_dont_see_your_device,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.extension<CakeTextTheme>()!
.titleColor),
style: Theme.of(context).textTheme.titleMedium,
textAlign: TextAlign.center,
),
),
@ -227,12 +215,7 @@ class ConnectDevicePageBodyState extends State<ConnectDevicePageBody> {
padding: EdgeInsets.only(left: 20, right: 20, bottom: 20),
child: Text(
S.of(context).ledger_please_enable_bluetooth,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.extension<CakeTextTheme>()!
.titleColor),
style: Theme.of(context).textTheme.titleMedium,
textAlign: TextAlign.center,
),
),
@ -245,13 +228,7 @@ class ConnectDevicePageBodyState extends State<ConnectDevicePageBody> {
width: double.infinity,
child: Text(
S.of(context).bluetooth,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w400,
color: Theme.of(context)
.extension<CakeTextTheme>()!
.titleColor,
),
style: Theme.of(context).textTheme.bodyMedium,
),
),
),
@ -276,13 +253,7 @@ class ConnectDevicePageBodyState extends State<ConnectDevicePageBody> {
width: double.infinity,
child: Text(
S.of(context).usb,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w400,
color: Theme.of(context)
.extension<CakeTextTheme>()!
.titleColor,
),
style: Theme.of(context).textTheme.bodyMedium,
),
),
),
@ -303,12 +274,8 @@ class ConnectDevicePageBodyState extends State<ConnectDevicePageBody> {
if (widget.allowChangeWallet) ...[
PrimaryButton(
text: S.of(context).wallets,
color: Theme.of(context)
.extension<WalletListTheme>()!
.createNewWalletButtonBackgroundColor,
textColor: Theme.of(context)
.extension<WalletListTheme>()!
.restoreWalletButtonTextColor,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
onPressed: _onChangeWallet,
)
],

View file

@ -127,8 +127,8 @@
// child: PrimaryButton(
// text: "Disconnect",
// onPressed: () => disconnectCurrentDevice(),
// color: Theme.of(context).primaryColor,
// textColor: Colors.white),
// color: Theme.of(context).colorScheme.primary,
// textColor: Theme.of(context).colorScheme.onPrimary),
// ),
// ],
// if (selectedDevice == null) ...[
@ -156,8 +156,8 @@
// devices.add(device);
// }));
// },
// color: Theme.of(context).primaryColor,
// textColor: Colors.white),
// color: Theme.of(context).colorScheme.primary,
// textColor: Theme.of(context).colorScheme.onPrimary),
// Padding(
// padding: EdgeInsets.only(top: 20),
// child: PrimaryButton(
@ -166,8 +166,8 @@
// final dev = await ledger.listUsbDevices();
// setState(() => devices = dev);
// },
// color: Theme.of(context).primaryColor,
// textColor: Colors.white),
// color: Theme.of(context).colorScheme.primary,
// textColor: Theme.of(context).colorScheme.onPrimary),
// ),
// ],
// ],
@ -229,8 +229,8 @@
// printV("${ex.errorCode.toRadixString(16)} ${ex.message}");
// }
// },
// color: Theme.of(context).primaryColor,
// textColor: Colors.white),
// color: Theme.of(context).colorScheme.primary,
// textColor: Theme.of(context).colorScheme.onPrimary),
// );
// }
// }

View file

@ -3,12 +3,10 @@ import 'package:cake_wallet/entities/generate_name.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/src/widgets/blockchain_height_widget.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/wallet_hardware_restore_view_model.dart';
@ -26,8 +24,7 @@ class MoneroHardwareWalletOptionsPage extends BasePage {
String get title => S.current.restore_title_from_hardware_wallet;
@override
Widget body(BuildContext context) =>
_MoneroHardwareWalletOptionsForm(_walletHardwareRestoreVM);
Widget body(BuildContext context) => _MoneroHardwareWalletOptionsForm(_walletHardwareRestoreVM);
}
class _MoneroHardwareWalletOptionsForm extends StatefulWidget {
@ -40,8 +37,7 @@ class _MoneroHardwareWalletOptionsForm extends StatefulWidget {
_MoneroHardwareWalletOptionsFormState(_walletHardwareRestoreVM);
}
class _MoneroHardwareWalletOptionsFormState
extends State<_MoneroHardwareWalletOptionsForm> {
class _MoneroHardwareWalletOptionsFormState extends State<_MoneroHardwareWalletOptionsForm> {
_MoneroHardwareWalletOptionsFormState(this._walletHardwareRestoreVM)
: _formKey = GlobalKey<FormState>(),
_blockchainHeightKey = GlobalKey<BlockchainHeightState>(),
@ -68,8 +64,8 @@ class _MoneroHardwareWalletOptionsFormState
contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
content: Center(
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint),
constraints:
BoxConstraints(maxWidth: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@ -80,60 +76,34 @@ class _MoneroHardwareWalletOptionsFormState
child: Stack(
alignment: Alignment.centerRight,
children: [
TextFormField(
onChanged: (value) =>
_walletHardwareRestoreVM.name = value,
BaseTextFormField(
onChanged: (value) => _walletHardwareRestoreVM.name = value,
controller: _controller,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w600,
color: Theme.of(context)
.extension<CakeTextTheme>()!
.titleColor,
),
decoration: InputDecoration(
hintStyle: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.extension<NewWalletTheme>()!
.hintTextColor,
),
hintText: S.of(context).wallet_name,
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.extension<NewWalletTheme>()!
.underlineColor,
width: 1.0,
textStyle: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 20.0,
fontWeight: FontWeight.w600,
),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.extension<NewWalletTheme>()!
.underlineColor,
width: 1.0,
placeholderTextStyle: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 18.0,
fontWeight: FontWeight.w500,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
suffixIcon: Semantics(
label: S.of(context).generate_name,
child: IconButton(
onPressed: _onGenerateName,
icon: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Theme.of(context).hintColor,
),
width: 34,
height: 34,
child: Image.asset(
'assets/images/refresh_icon.png',
color: Theme.of(context)
.extension<SendPageTheme>()!
.textFieldButtonIconColor,
),
hintText: S.of(context).wallet_name,
suffixIcon: Semantics(
label: S.of(context).generate_name,
child: IconButton(
onPressed: _onGenerateName,
icon: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Theme.of(context).colorScheme.surfaceContainerHighest,
),
width: 34,
height: 34,
child: Image.asset(
'assets/images/refresh_icon.png',
color: Theme.of(context).colorScheme.primary,
),
),
),
@ -162,8 +132,8 @@ class _MoneroHardwareWalletOptionsFormState
builder: (context) => LoadingPrimaryButton(
onPressed: _confirmForm,
text: S.of(context).seed_language_next,
color: Colors.green,
textColor: Colors.white,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
isDisabled: _walletHardwareRestoreVM.name.isEmpty,
),
),
@ -178,8 +148,8 @@ class _MoneroHardwareWalletOptionsFormState
setState(() {
_controller.text = rName;
_walletHardwareRestoreVM.name = rName;
_controller.selection = TextSelection.fromPosition(
TextPosition(offset: _controller.text.length));
_controller.selection =
TextSelection.fromPosition(TextPosition(offset: _controller.text.length));
});
}
@ -206,8 +176,7 @@ class _MoneroHardwareWalletOptionsFormState
reaction((_) => _walletHardwareRestoreVM.error, (String? error) {
if (error != null) {
if (error == S.current.ledger_connection_error)
Navigator.of(context).pop();
if (error == S.current.ledger_connection_error) Navigator.of(context).pop();
WidgetsBinding.instance.addPostFrameCallback((_) {
showPopUp<void>(

View file

@ -4,11 +4,9 @@ import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/wallet_hardware_restore_view_model.dart';
@ -75,63 +73,50 @@ class _SelectHardwareWalletAccountFormState extends State<SelectHardwareWalletAc
child: Stack(
alignment: Alignment.centerRight,
children: [
TextFormField(
BaseTextFormField(
onChanged: (value) => _walletHardwareRestoreVM.name = value,
controller: _controller,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w600,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
),
decoration: InputDecoration(
hintStyle: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w500,
color: Theme.of(context).extension<NewWalletTheme>()!.hintTextColor,
),
hintText: S.of(context).wallet_name,
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color:
Theme.of(context).extension<NewWalletTheme>()!.underlineColor,
width: 1.0,
textStyle: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 20.0,
fontWeight: FontWeight.w600,
),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color:
Theme.of(context).extension<NewWalletTheme>()!.underlineColor,
width: 1.0,
placeholderTextStyle: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 18.0,
fontWeight: FontWeight.w500,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
suffixIcon: Semantics(
label: S.of(context).generate_name,
child: IconButton(
onPressed: () async {
final rName = await generateName();
FocusManager.instance.primaryFocus?.unfocus();
hintText: S.of(context).wallet_name,
// enabledBorder: UnderlineInputBorder(
// borderSide: BorderSide(
// color: Theme.of(context).colorScheme.outline,
// width: 100,
// ),
// ),
suffixIcon: Semantics(
label: S.of(context).generate_name,
child: IconButton(
onPressed: () async {
final rName = await generateName();
FocusManager.instance.primaryFocus?.unfocus();
setState(() {
_controller.text = rName;
_walletHardwareRestoreVM.name = rName;
_controller.selection = TextSelection.fromPosition(
TextPosition(offset: _controller.text.length));
});
},
icon: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Theme.of(context).hintColor,
),
width: 34,
height: 34,
child: Image.asset(
'assets/images/refresh_icon.png',
color: Theme.of(context)
.extension<SendPageTheme>()!
.textFieldButtonIconColor,
),
setState(() {
_controller.text = rName;
_walletHardwareRestoreVM.name = rName;
_controller.selection = TextSelection.fromPosition(
TextPosition(offset: _controller.text.length));
});
},
icon: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Theme.of(context).colorScheme.surfaceContainerHighest,
),
width: 34,
height: 34,
child: Image.asset(
'assets/images/refresh_icon.png',
color: Theme.of(context).colorScheme.primary,
),
),
),
@ -148,18 +133,16 @@ class _SelectHardwareWalletAccountFormState extends State<SelectHardwareWalletAc
width: double.infinity,
child: Text(
S.of(context).select_hw_account_below,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
),
),
Observer(
builder: (context) => Column(
children: _walletHardwareRestoreVM.availableAccounts.map((acc) {
final address = acc.address;
return Padding(
padding: EdgeInsets.only(top: 10),
@ -171,7 +154,7 @@ class _SelectHardwareWalletAccountFormState extends State<SelectHardwareWalletAc
width: 24,
),
text:
"${acc.accountIndex} - ${address.substring(0, 6)}...${address.substring(address.length - 6)}",
"${acc.accountIndex} - ${address.substring(0, 6)}...${address.substring(address.length - 6)}",
showTrailingIcon: false,
height: 54,
isSelected: _walletHardwareRestoreVM.selectedAccount == acc,
@ -184,15 +167,17 @@ class _SelectHardwareWalletAccountFormState extends State<SelectHardwareWalletAc
),
Padding(
padding: EdgeInsets.only(top: 10),
child: Observer(builder: (context) {
return LoadingPrimaryButton(
onPressed: _loadMoreAccounts,
text: S.of(context).load_more,
color: Theme.of(context).primaryColor,
textColor: Colors.white,
isLoading: _walletHardwareRestoreVM.isLoadingMoreAccounts,
);
}),
child: Observer(
builder: (context) {
return LoadingPrimaryButton(
onPressed: _loadMoreAccounts,
text: S.of(context).load_more,
color: Theme.of(context).colorScheme.surfaceContainer,
textColor: Theme.of(context).colorScheme.onSecondaryContainer,
isLoading: _walletHardwareRestoreVM.isLoadingMoreAccounts,
);
},
),
),
],
),
@ -204,8 +189,8 @@ class _SelectHardwareWalletAccountFormState extends State<SelectHardwareWalletAc
return LoadingPrimaryButton(
onPressed: _confirmForm,
text: S.of(context).seed_language_next,
color: Colors.green,
textColor: Colors.white,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
isDisabled: _walletHardwareRestoreVM.name.isEmpty,
);
},
@ -229,11 +214,8 @@ class _SelectHardwareWalletAccountFormState extends State<SelectHardwareWalletAc
if (_effectsInstalled) return;
reaction((_) => _walletHardwareRestoreVM.error, (String? error) {
if (error != null) {
if (error == S.current.ledger_connection_error)
Navigator.of(context).pop();
if (error == S.current.ledger_connection_error) Navigator.of(context).pop();
WidgetsBinding.instance.addPostFrameCallback((_) {
showPopUp<void>(

View file

@ -1,4 +1,3 @@
import 'package:cake_wallet/themes/extensions/option_tile_theme.dart';
import 'package:flutter/material.dart';
import 'package:ledger_flutter_plus/ledger_flutter_plus.dart';
@ -36,7 +35,7 @@ class DeviceTile extends StatelessWidget {
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)),
color: Theme.of(context).cardColor,
color: Theme.of(context).colorScheme.surfaceContainer,
),
child: Row(
mainAxisSize: MainAxisSize.max,
@ -47,17 +46,16 @@ class DeviceTile extends StatelessWidget {
Image.asset(
leading!,
height: 30,
color: Theme.of(context).extension<OptionTileTheme>()!.titleColor,
color: Theme.of(context).colorScheme.onSurface,
),
Expanded(
child: Padding(
padding: EdgeInsets.only(left: 16),
child: Text(
title,
style: TextStyle(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 20,
fontWeight: FontWeight.w500,
color: Theme.of(context).extension<OptionTileTheme>()!.titleColor,
),
),
),
@ -67,7 +65,7 @@ class DeviceTile extends StatelessWidget {
child: Image.asset(
connectionTypeIcon!,
height: 25,
color: Theme.of(context).extension<OptionTileTheme>()!.titleColor,
color: Theme.of(context).colorScheme.onSurface,
),
)
],

View file

@ -1,5 +1,4 @@
import 'package:cake_wallet/core/auth_service.dart';
import 'package:cake_wallet/entities/contact.dart';
import 'package:cake_wallet/entities/contact_base.dart';
import 'package:cake_wallet/entities/contact_record.dart';
import 'package:cake_wallet/entities/wallet_list_order_types.dart';
@ -10,8 +9,6 @@ import 'package:cake_wallet/src/screens/dashboard/widgets/filter_list_widget.dar
import 'package:cake_wallet/src/screens/wallet_list/filtered_list.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/src/widgets/standard_list.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/utils/address_formatter.dart';
import 'package:cake_wallet/utils/show_bar.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
@ -38,8 +35,9 @@ class ContactListPage extends BasePage {
width: 32.0,
height: 32.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).extension<ExchangePageTheme>()!.buttonBackgroundColor),
shape: BoxShape.circle,
color: Theme.of(context).colorScheme.surfaceContainerHighest,
),
child: Semantics(
label: S.of(context).add_contact,
button: true,
@ -48,28 +46,29 @@ class ContactListPage extends BasePage {
children: <Widget>[
Icon(
Icons.add,
color: Theme.of(context).appBarTheme.titleTextStyle!.color,
color: Theme.of(context).colorScheme.onSurface,
size: 22.0,
),
ButtonTheme(
minWidth: 32.0,
height: 32.0,
child: TextButton(
// FIX-ME: Style
//shape: CircleBorder(),
onPressed: () async {
if (contactListViewModel.shouldRequireTOTP2FAForAddingContacts) {
authService.authenticateAction(
context,
route: Routes.addressBookAddContact,
conditionToDetermineIfToUse2FA:
contactListViewModel.shouldRequireTOTP2FAForAddingContacts,
);
} else {
await Navigator.of(context).pushNamed(Routes.addressBookAddContact);
}
},
child: Offstage()),
// FIX-ME: Style
//shape: CircleBorder(),
onPressed: () async {
if (contactListViewModel.shouldRequireTOTP2FAForAddingContacts) {
authService.authenticateAction(
context,
route: Routes.addressBookAddContact,
conditionToDetermineIfToUse2FA:
contactListViewModel.shouldRequireTOTP2FAForAddingContacts,
);
} else {
await Navigator.of(context).pushNamed(Routes.addressBookAddContact);
}
},
child: Offstage(),
),
)
],
),
@ -117,46 +116,45 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
children: [
Padding(
padding: const EdgeInsets.only(left: 24, right: 24, bottom: 8),
child: Align(
alignment: Alignment.centerLeft,
child: TabBar(
controller: _tabController,
splashFactory: NoSplash.splashFactory,
indicatorSize: TabBarIndicatorSize.label,
isScrollable: true,
labelStyle: TextStyle(
fontSize: 18,
fontFamily: 'Lato',
fontWeight: FontWeight.w600,
color: Theme.of(context).appBarTheme.titleTextStyle!.color,
child: Align(
alignment: Alignment.centerLeft,
child: TabBar(
controller: _tabController,
splashFactory: NoSplash.splashFactory,
indicatorSize: TabBarIndicatorSize.label,
isScrollable: true,
labelStyle: Theme.of(context).textTheme.bodyLarge!.copyWith(
fontSize: 20,
fontWeight: FontWeight.w600,
color: Theme.of(context).colorScheme.primary,
),
unselectedLabelStyle: Theme.of(context).textTheme.bodyLarge!.copyWith(
fontSize: 20,
fontWeight: FontWeight.w600,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
indicatorColor: Theme.of(context).colorScheme.primary,
indicatorPadding: EdgeInsets.zero,
labelPadding: EdgeInsets.only(right: 24),
tabAlignment: TabAlignment.start,
dividerColor: Colors.transparent,
padding: EdgeInsets.zero,
tabs: [
Tab(text: S.of(context).wallets),
Tab(text: S.of(context).contact_list_contacts),
],
),
unselectedLabelStyle: TextStyle(
fontSize: 18,
fontFamily: 'Lato',
fontWeight: FontWeight.w600,
color: Theme.of(context).appBarTheme.titleTextStyle!.color?.withOpacity(0.5)),
labelColor: Theme.of(context).appBarTheme.titleTextStyle!.color,
indicatorColor: Theme.of(context).appBarTheme.titleTextStyle!.color,
indicatorPadding: EdgeInsets.zero,
labelPadding: EdgeInsets.only(right: 24),
tabAlignment: TabAlignment.start,
dividerColor: Colors.transparent,
padding: EdgeInsets.zero,
tabs: [
Tab(text: S.of(context).wallets),
Tab(text: S.of(context).contact_list_contacts),
],
),
),
),
Expanded(
child: TabBarView(
controller: _tabController,
children: [
_buildWalletContacts(context),
ContactListBody(
contactListViewModel: widget.contactListViewModel,
tabController: _tabController),
contactListViewModel: widget.contactListViewModel,
tabController: _tabController,
),
],
),
),
@ -195,26 +193,22 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
return Padding(
padding: const EdgeInsets.only(left: 16, right: 16, top: 4, bottom: 4),
child: ExpansionTile(
title: Text(
groupName,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.normal,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
child: ExpansionTile(
title: Text(
groupName,
style: Theme.of(context).textTheme.bodyMedium!,
),
leading: _buildCurrencyIcon(activeContact),
tilePadding: const EdgeInsets.only(left: 16, right: 16),
childrenPadding: const EdgeInsets.only(left: 16),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
expandedAlignment: Alignment.topLeft,
backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
collapsedBackgroundColor: Theme.of(context).colorScheme.surfaceContainer,
collapsedShape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
children: groupContacts.map((contact) => generateRaw(context, contact)).toList(),
),
leading: _buildCurrencyIcon(activeContact),
tilePadding: const EdgeInsets.only(left: 16, right: 16),
childrenPadding: const EdgeInsets.only(left: 16),
expandedCrossAxisAlignment: CrossAxisAlignment.start,
expandedAlignment: Alignment.topLeft,
backgroundColor: Theme.of(context).cardColor,
collapsedBackgroundColor: Theme.of(context).cardColor,
collapsedShape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
children: groupContacts.map((contact) => generateRaw(context, contact)).toList(),
),
);
}
}
@ -246,10 +240,10 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
},
behavior: HitTestBehavior.opaque,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
color: Theme.of(context).cardColor,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
color: Theme.of(context).colorScheme.surfaceContainer,
),
margin: const EdgeInsets.only(top: 4, bottom: 4, left: 16, right: 16),
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 16, left: 16),
child: Row(
@ -262,11 +256,7 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
padding: EdgeInsets.only(left: 12),
child: Text(
contact.name,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.normal,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
),
style: Theme.of(context).textTheme.bodyMedium!,
),
),
),
@ -324,7 +314,7 @@ class _ContactListBodyState extends State<ContactListBody> {
? widget.contactListViewModel.contacts
: widget.contactListViewModel.contactsToShow;
return Scaffold(
backgroundColor: Theme.of(context).colorScheme.background,
backgroundColor: Theme.of(context).colorScheme.surface,
body: Container(
child: FilteredList(
list: contacts,
@ -343,8 +333,7 @@ class _ContactListBodyState extends State<ContactListBody> {
return;
}
final isCopied =
await DialogService.showNameAndAddressDialog(context, contact);
final isCopied = await DialogService.showNameAndAddressDialog(context, contact);
if (isCopied) {
await Clipboard.setData(ClipboardData(text: contact.address));
@ -356,7 +345,8 @@ class _ContactListBodyState extends State<ContactListBody> {
? Slidable(
key: Key('${contact.key}'),
endActionPane: _actionPane(context, contact),
child: contactContent)
child: contactContent,
)
: contactContent,
);
},
@ -379,7 +369,7 @@ class _ContactListBodyState extends State<ContactListBody> {
key: Key('${contact.name}'),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)),
color: Theme.of(context).cardColor,
color: Theme.of(context).colorScheme.surfaceContainer,
),
margin: const EdgeInsets.only(top: 4, bottom: 4, left: 16, right: 16),
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 16, left: 16),
@ -393,11 +383,7 @@ class _ContactListBodyState extends State<ContactListBody> {
padding: EdgeInsets.only(left: 12),
child: Text(
contact.name,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.normal,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
),
style: Theme.of(context).textTheme.bodyMedium!,
),
))
],
@ -407,37 +393,41 @@ class _ContactListBodyState extends State<ContactListBody> {
);
}
ActionPane _actionPane(BuildContext context, ContactRecord contact) => ActionPane(
ActionPane _actionPane(BuildContext context, ContactRecord contact) {
return ActionPane(
motion: const ScrollMotion(),
extentRatio: 0.4,
children: [
SlidableAction(
onPressed: (_) async => await Navigator.of(context)
.pushNamed(Routes.addressBookAddContact, arguments: contact),
backgroundColor: Colors.blue,
foregroundColor: Colors.white,
backgroundColor: Theme.of(context).colorScheme.primary,
foregroundColor: Theme.of(context).colorScheme.onSurface,
icon: Icons.edit,
label: S.of(context).edit,
),
SlidableAction(
onPressed: (_) async {
final isDelete = await DialogService.showAlertDialog(context);
if (isDelete) {
await widget.contactListViewModel.delete(contact);
}
},
backgroundColor: Colors.red,
foregroundColor: Colors.white,
backgroundColor: Theme.of(context).colorScheme.error,
foregroundColor: Theme.of(context).colorScheme.onSurface,
icon: CupertinoIcons.delete,
label: S.of(context).delete,
),
],
);
}
Widget filterButtonWidget(BuildContext context, ContactListViewModel contactListViewModel) {
final filterIcon = Image.asset('assets/images/filter_icon.png',
color: Theme.of(context).appBarTheme.titleTextStyle!.color);
final filterIcon = Image.asset(
'assets/images/filter_icon.png',
color: Theme.of(context).colorScheme.onSurface,
);
return MergeSemantics(
child: SizedBox(
height: 58,
@ -469,7 +459,7 @@ class _ContactListBodyState extends State<ContactListBody> {
width: 36,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).extension<ExchangePageTheme>()!.buttonBackgroundColor,
color: Theme.of(context).colorScheme.surfaceContainer,
),
child: filterIcon,
),
@ -480,50 +470,45 @@ class _ContactListBodyState extends State<ContactListBody> {
),
);
}
}
class DialogService {
static Future<bool> showAlertDialog(BuildContext context) async {
return await showPopUp<bool>(
context: context,
builder: (BuildContext context) {
return AlertWithTwoActions(
alertTitle: S.of(context).address_remove_contact,
alertContent: S.of(context).address_remove_content,
rightButtonText: S.of(context).remove,
leftButtonText: S.of(context).cancel,
actionRightButton: () => Navigator.of(context).pop(true),
actionLeftButton: () => Navigator.of(context).pop(false));
}) ??
context: context,
builder: (BuildContext context) {
return AlertWithTwoActions(
alertTitle: S.of(context).address_remove_contact,
alertContent: S.of(context).address_remove_content,
rightButtonText: S.of(context).remove,
leftButtonText: S.of(context).cancel,
actionRightButton: () => Navigator.of(context).pop(true),
actionLeftButton: () => Navigator.of(context).pop(false));
}) ??
false;
}
static Future<bool> showNameAndAddressDialog(BuildContext context,ContactBase contact) async {
static Future<bool> showNameAndAddressDialog(BuildContext context, ContactBase contact) async {
return await showPopUp<bool>(
context: context,
builder: (BuildContext context) {
return AlertWithTwoActions(
alertTitle: contact.name,
alertContent: contact.address,
alertContentTextWidget: AddressFormatter.buildSegmentedAddress(
address: contact.address,
textAlign: TextAlign.center,
walletType: cryptoCurrencyToWalletType(contact.type),
evenTextStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.normal,
fontFamily: 'Lato',
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
decoration: TextDecoration.none,
),
),
rightButtonText: S.of(context).copy,
leftButtonText: S.of(context).cancel,
actionRightButton: () => Navigator.of(context).pop(true),
actionLeftButton: () => Navigator.of(context).pop(false));
}) ??
context: context,
builder: (BuildContext context) {
return AlertWithTwoActions(
alertTitle: contact.name,
alertContent: contact.address,
alertContentTextWidget: AddressFormatter.buildSegmentedAddress(
address: contact.address,
textAlign: TextAlign.center,
walletType: cryptoCurrencyToWalletType(contact.type),
evenTextStyle: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 16,
decoration: TextDecoration.none,
),
),
rightButtonText: S.of(context).copy,
leftButtonText: S.of(context).cancel,
actionRightButton: () => Navigator.of(context).pop(true),
actionLeftButton: () => Navigator.of(context).pop(false));
}) ??
false;
}
}

View file

@ -1,6 +1,4 @@
import 'package:cake_wallet/core/address_validator.dart';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cw_core/currency.dart';
import 'package:flutter/material.dart';
@ -18,8 +16,6 @@ import 'package:cake_wallet/src/widgets/address_text_field.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart';
import 'package:cake_wallet/themes/extensions/address_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
class ContactPage extends BasePage {
ContactPage(this.contactViewModel)
@ -29,13 +25,10 @@ class ContactPage extends BasePage {
_currencyTypeController = TextEditingController() {
_nameController.text = contactViewModel.name;
_addressController.text = contactViewModel.address;
_nameController
.addListener(() => contactViewModel.name = _nameController.text);
_addressController
.addListener(() => contactViewModel.address = _addressController.text);
_nameController.addListener(() => contactViewModel.name = _nameController.text);
_addressController.addListener(() => contactViewModel.address = _addressController.text);
autorun((_) => _currencyTypeController.text =
contactViewModel.currency?.toString() ?? '');
autorun((_) => _currencyTypeController.text = contactViewModel.currency?.toString() ?? '');
}
@override
@ -50,9 +43,11 @@ class ContactPage extends BasePage {
@override
Widget body(BuildContext context) {
final downArrow = Image.asset('assets/images/arrow_bottom_purple_icon.png',
color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor,
height: 8);
final downArrow = Image.asset(
'assets/images/arrow_bottom_purple_icon.png',
color: Theme.of(context).colorScheme.primary,
height: 8,
);
_setEffects(context);
@ -65,24 +60,29 @@ class ContactPage extends BasePage {
mainAxisSize: MainAxisSize.min,
children: <Widget>[
BaseTextFormField(
controller: _nameController,
hintText: S.of(context).contact_name,
validator: ContactNameValidator()),
controller: _nameController,
hintText: S.of(context).contact_name,
validator: ContactNameValidator(),
),
Padding(
padding: EdgeInsets.only(top: 20),
child: Container(
child: InkWell(
onTap: () => _presentCurrencyPicker(context),
child: IgnorePointer(
child: BaseTextFormField(
controller: _currencyTypeController,
hintText: S.of(context).settings_currency,
suffixIcon: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[downArrow],
child: BaseTextFormField(
controller: _currencyTypeController,
hintText: S.of(context).settings_currency,
suffixIcon: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
downArrow,
SizedBox(width: 16),
],
),
),
)),
),
),
),
),
@ -95,47 +95,47 @@ class ContactPage extends BasePage {
AddressTextFieldOption.paste,
AddressTextFieldOption.qrCode,
],
buttonColor: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
iconColor: PaletteDark.gray,
borderColor: Theme.of(context).extension<CakeTextTheme>()!.textfieldUnderlineColor,
validator:
AddressValidator(type: contactViewModel.currency!),
buttonColor: Theme.of(context).colorScheme.surfaceContainerHighest,
iconColor: Theme.of(context).colorScheme.onSurfaceVariant,
validator: AddressValidator(type: contactViewModel.currency!),
),
)
],
),
),
bottomSectionPadding:
EdgeInsets.only(left: 24, right: 24, bottom: 24),
bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
bottomSection: Row(
children: <Widget>[
Expanded(
child: PrimaryButton(
onPressed: () {
contactViewModel.reset();
_nameController.text = '';
_addressController.text = '';
},
text: S.of(context).reset,
color: Colors.orange,
textColor: Colors.white),
onPressed: () {
contactViewModel.reset();
_nameController.text = '';
_addressController.text = '';
},
text: S.of(context).reset,
color: Theme.of(context).colorScheme.surfaceContainer,
textColor: Theme.of(context).colorScheme.onSecondaryContainer,
),
),
SizedBox(width: 20),
Expanded(
child: Observer(
builder: (_) => PrimaryButton(
onPressed: () async {
if (_formKey.currentState != null &&
!_formKey.currentState!.validate()) {
return;
}
child: Observer(
builder: (_) => PrimaryButton(
onPressed: () async {
if (_formKey.currentState != null && !_formKey.currentState!.validate()) {
return;
}
await contactViewModel.save();
},
text: S.of(context).save,
color: Theme.of(context).primaryColor,
textColor: Colors.white,
isDisabled: !contactViewModel.isReady)))
await contactViewModel.save();
},
text: S.of(context).save,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
isDisabled: !contactViewModel.isReady,
),
),
)
],
)),
);
@ -143,17 +143,16 @@ class ContactPage extends BasePage {
void _presentCurrencyPicker(BuildContext context) {
showPopUp<void>(
builder: (_) => CurrencyPicker(
selectedAtIndex: contactViewModel.currency != null
? contactViewModel.currencies
.indexOf(contactViewModel.currency!)
: -1,
items: contactViewModel.currencies,
title: S.of(context).please_select,
hintText: S.of(context).search_currency,
onItemSelected: (Currency item) =>
contactViewModel.currency = item as CryptoCurrency),
context: context);
builder: (_) => CurrencyPicker(
selectedAtIndex: contactViewModel.currency != null
? contactViewModel.currencies.indexOf(contactViewModel.currency!)
: -1,
items: contactViewModel.currencies,
title: S.of(context).please_select,
hintText: S.of(context).search_currency,
onItemSelected: (Currency item) => contactViewModel.currency = item as CryptoCurrency),
context: context,
);
}
void _onContactSavingFailure(BuildContext context, String error) {
@ -161,15 +160,15 @@ class ContactPage extends BasePage {
context: context,
builder: (BuildContext context) {
return AlertWithOneAction(
alertTitle: S.current.contact,
alertContent: error,
buttonText: S.of(context).ok,
buttonAction: () => Navigator.of(context).pop());
alertTitle: S.current.contact,
alertContent: error,
buttonText: S.of(context).ok,
buttonAction: () => Navigator.of(context).pop(),
);
});
}
void _onContactSavedSuccessfully(BuildContext context) =>
Navigator.of(context).pop();
void _onContactSavedSuccessfully(BuildContext context) => Navigator.of(context).pop();
void _setEffects(BuildContext context) {
if (_isEffectsApplied) {

View file

@ -27,12 +27,12 @@ import 'package:cake_wallet/src/screens/dashboard/pages/transactions_page.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator.dart';
import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mobx/mobx.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:smooth_page_indicator/smooth_page_indicator.dart';
import 'package:cake_wallet/main.dart';
import 'package:cake_wallet/src/screens/release_notes/release_notes_screen.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
class DashboardPage extends StatefulWidget {
DashboardPage({
@ -164,18 +164,19 @@ class _DashboardPageView extends BasePage {
@override
Widget trailing(BuildContext context) {
final menuButton = Image.asset(
'assets/images/menu.png',
color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
);
return Container(
alignment: Alignment.centerRight,
width: 40,
width: 42,
child: TextButton(
key: ValueKey('dashboard_page_wallet_menu_button_key'),
onPressed: () => onOpenEndDrawer(),
child: Semantics(label: S.of(context).wallet_menu, child: menuButton),
child: Semantics(
label: S.of(context).wallet_menu,
child: SvgPicture.asset(
'assets/images/menu.svg',
color: Theme.of(context).colorScheme.onSurface,
),
),
),
);
}
@ -250,14 +251,8 @@ class _DashboardPageView extends BasePage {
radius: 6.0,
dotWidth: 6.0,
dotHeight: 6.0,
dotColor: Theme.of(context)
.extension<DashboardPageTheme>()!
.indicatorDotTheme
.indicatorColor,
activeDotColor: Theme.of(context)
.extension<DashboardPageTheme>()!
.indicatorDotTheme
.activeIndicatorColor,
dotColor: Theme.of(context).colorScheme.primary.withOpacity(0.4),
activeDotColor: Theme.of(context).colorScheme.primary,
),
),
);
@ -265,7 +260,10 @@ class _DashboardPageView extends BasePage {
),
),
),
NavigationDock(dashboardViewModel: dashboardViewModel)
NavigationDock(
dashboardViewModel: dashboardViewModel,
currentTheme: currentTheme,
)
],
),
),
@ -307,7 +305,6 @@ class _DashboardPageView extends BasePage {
rootKey.currentState?.isInactive.listen(
(inactive) {
if (needToPresentYat) {
Future<void>.delayed(Duration(milliseconds: 500)).then(
(_) {

View file

@ -35,7 +35,7 @@ class DesktopDashboardPage extends StatelessWidget {
_setEffects(context);
return Container(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

View file

@ -1,10 +1,4 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:flutter/material.dart';
class DesktopActionButton extends StatelessWidget {
@ -38,7 +32,7 @@ class DesktopActionButton extends StatelessWidget {
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
color: Theme.of(context).colorScheme.surfaceContainer,
),
child: Center(
child: Row(
@ -49,19 +43,18 @@ class DesktopActionButton extends StatelessWidget {
height: 30,
width: 30,
color: isEnabled
? Theme.of(context).extension<DashboardPageTheme>()!.textColor
: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor,
? Theme.of(context).colorScheme.onPrimaryContainer
: Theme.of(context).colorScheme.onSurfaceVariant,
),
const SizedBox(width: 10),
AutoSizeText(
title,
style: TextStyle(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: 24,
fontFamily: 'Lato',
fontWeight: FontWeight.bold,
color: isEnabled
? Theme.of(context).extension<DashboardPageTheme>()!.textColor
: null,
? Theme.of(context).colorScheme.onPrimaryContainer
: Theme.of(context).colorScheme.onSurfaceVariant,
height: 1,
),
maxLines: 1,

View file

@ -15,7 +15,7 @@ class DesktopDashboardActions extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: Observer(
builder: (_) {
return Column(

View file

@ -1,6 +1,6 @@
import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cake_wallet/themes/core/theme_store.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -16,16 +16,14 @@ class DesktopDashboardNavbar extends StatelessWidget implements ObstructingPrefe
required this.trailing,
});
ThemeBase get currentTheme => getIt.get<SettingsStore>().currentTheme;
MaterialThemeBase get currentTheme => getIt.get<ThemeStore>().currentTheme;
@override
Widget build(BuildContext context) {
final appBarColor =
currentTheme.type == ThemeType.dark ? Colors.black.withOpacity(0.1) : Colors.white;
return Container(
padding: const EdgeInsetsDirectional.only(end: 24),
color: appBarColor,
color: Theme.of(context).colorScheme.surfaceContainerLowest.withOpacity(0.1),
child: Center(
child: Row(
mainAxisSize: MainAxisSize.max,

View file

@ -16,7 +16,7 @@ class SideMenu extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.black.withOpacity(0.1),
color: Theme.of(context).colorScheme.surfaceContainerLowest.withOpacity(0.1),
width: width,
height: MediaQuery.of(context).size.height,
child: Column(

View file

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
class SideMenuItem extends StatelessWidget {
const SideMenuItem({
@ -19,9 +18,9 @@ class SideMenuItem extends StatelessWidget {
Color _setColor(BuildContext context) {
if (isSelected) {
return Theme.of(context).extension<CakeTextTheme>()!.titleColor;
return Theme.of(context).colorScheme.primary;
} else {
return Theme.of(context).highlightColor;
return Theme.of(context).colorScheme.onSurfaceVariant;
}
}

View file

@ -137,7 +137,7 @@ class DesktopSidebarWrapper extends BasePage {
children: [
child,
Container(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
padding: EdgeInsets.all(20),
child: Navigator(
initialRoute: Routes.support,

View file

@ -1,6 +1,5 @@
import 'package:another_flushbar/flushbar.dart';
import 'package:cake_wallet/core/new_wallet_arguments.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/core/auth_service.dart';
import 'package:cake_wallet/entities/desktop_dropdown_item.dart';
import 'package:cake_wallet/generated/i18n.dart';
@ -10,8 +9,6 @@ import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/dropdown_item_
import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
import 'package:cake_wallet/utils/exception_handler.dart';
import 'package:cake_wallet/utils/show_bar.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/wallet_list/wallet_list_item.dart';
@ -54,14 +51,14 @@ class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionD
'assets/images/new_wallet.png',
height: 12,
width: 12,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
color: Theme.of(context).colorScheme.onSurface,
);
Image _restoreWalletImage(BuildContext context) => Image.asset(
'assets/images/restore_wallet.png',
height: 12,
width: 12,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
color: Theme.of(context).colorScheme.onSurface,
);
Flushbar<void>? _progressBar;
@ -119,8 +116,8 @@ class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionD
onChanged: (item) {
item?.onSelected();
},
dropdownColor: themeData.extension<CakeMenuTheme>()!.backgroundColor,
style: TextStyle(color: themeData.extension<CakeTextTheme>()!.titleColor),
dropdownColor: themeData.colorScheme.surface,
style: themeData.textTheme.bodyMedium,
selectedItemBuilder: (context) => dropDownItems.map((item) => item.child).toList(),
value: selectedItem,
underline: const SizedBox(),
@ -256,7 +253,7 @@ class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionD
}
void changeProcessText(String text) {
_progressBar = createBar<void>(text, duration: null)..show(context);
_progressBar = createBar<void>(text,context, duration: null)..show(context);
}
void hideProgressText() {

View file

@ -1,4 +1,3 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart';
class DropDownItemWidget extends StatelessWidget {
@ -21,11 +20,7 @@ class DropDownItemWidget extends StatelessWidget {
Flexible(
child: Text(
title,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
),
style: Theme.of(context).textTheme.bodyMedium,
overflow: TextOverflow.ellipsis,
maxLines: 1,
),

Some files were not shown because too many files have changed in this diff Show more