Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rearchitecture of Dashboard features #131

Open
wants to merge 104 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 101 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
aed7384
feat: Create dev run configuration
maznnwell Oct 10, 2024
7b18e50
refactor: dashboard blocs.
kossmmos Oct 10, 2024
f3c2550
mods: delegation cubit. tests.
kossmmos Oct 10, 2024
38853b1
mods: delegation cubit - tests.
kossmmos Oct 10, 2024
ea295c1
Merge pull request #1 from kossmmos/rearchitecture
maznnwell Oct 10, 2024
ca4c587
Merge branch 'flavors' into rearchitecture
maznnwell Oct 10, 2024
7eb39c1
feat: Improve the DashboardCubit class
maznnwell Oct 11, 2024
71a96ac
feat: Finish the delegation widgets
maznnwell Oct 11, 2024
6c81122
feat: Use a CardData object to hold the title and description of a card
maznnwell Oct 11, 2024
fa77953
feat: Fill up the balance widgets
maznnwell Oct 12, 2024
bd8b12c
fix: Assign the correct card data to the CardType.balance value
maznnwell Oct 12, 2024
5930b56
feat: Improve the DashboardCubit so that the cubits that implement it…
maznnwell Oct 12, 2024
5c57c1f
feat: Fill up the dual coin stats widgets
maznnwell Oct 17, 2024
70968c3
fix: Navigate after the current frame finished rendering
maznnwell Oct 17, 2024
6b7ac2e
Merge branch 'flavors' into rearchitecture
maznnwell Oct 17, 2024
d67bfa7
fix: Apply fixes with dart fix --apply
maznnwell Oct 17, 2024
5f6a0ea
fix: Use the super parameters
maznnwell Oct 17, 2024
4678074
refactor: Replace deprecated methods or classes
maznnwell Oct 18, 2024
e82d7d5
feat: Use very_good_analysis for linter rules and solve some issues w…
maznnwell Oct 18, 2024
c47311a
feat: Add localization
maznnwell Oct 18, 2024
23cc37b
feat: Exemplify how to use AppLocalizations
maznnwell Oct 19, 2024
1367354
feat: Enable l10n for the dev entry point also
maznnwell Oct 19, 2024
bfc0836
fix: Regenerate the windows folder
maznnwell Oct 19, 2024
594c597
refactor: Delete unused widgets
maznnwell Oct 19, 2024
cfa9e26
feat: Add documentation of public members inside the dual_coin_stats …
maznnwell Oct 19, 2024
6acd44d
feat: Replace Pillars with PillarsCard
maznnwell Oct 19, 2024
95746e1
feat: Replace RealtimeStatistics with RealtimeStatisticsCard
maznnwell Oct 20, 2024
bebc154
feat: Fill up the sentinels widgets
maznnwell Oct 23, 2024
c6fff16
refactor: Change fields' order
maznnwell Oct 23, 2024
3e12e56
fix: Documentation
maznnwell Oct 23, 2024
63ec7ce
feat: Fill the staking widgets
maznnwell Oct 23, 2024
8588dc5
fix: Documentation
maznnwell Oct 23, 2024
714ddc4
feat: Fill up the total hourly transactions widgets
maznnwell Oct 23, 2024
5c209ae
feat: Delete unused blocs
maznnwell Oct 23, 2024
991a0a6
feat: Tweak balance features
maznnwell Oct 23, 2024
74991c3
refactor: Delete unused bloc
maznnwell Oct 23, 2024
ddd3306
feat: Create the node sync status feature
maznnwell Oct 24, 2024
3ecac7e
feat: Delete unused class
maznnwell Oct 24, 2024
c48a47d
feat: Adapt Transfer widget to the new architecture
maznnwell Oct 24, 2024
0d7c7db
chore: Redo dashboard.dart exports
maznnwell Oct 24, 2024
ef8a24a
chore: Delete unused feature balance_dashboard
maznnwell Oct 24, 2024
5b37f19
feat: Use localization version strings for generating CardData objects
maznnwell Oct 24, 2024
8b4ea0e
chore: Improve documentation
maznnwell Oct 25, 2024
2141f6a
chore: Rename CubitStatus class to DashboardStatus
maznnwell Oct 25, 2024
7c131cf
chore: Improve documentation of the balance feature
maznnwell Oct 25, 2024
a9482ee
chore: Improve documentation and solve linter issues
maznnwell Oct 25, 2024
c81841f
feat: Make the DashboardCubit a HydratedCubit
maznnwell Oct 26, 2024
ac00b71
feat: Make custom exceptions serializable and move them to separated …
maznnwell Oct 26, 2024
2babef9
feat: Structure the error handling mechanism
maznnwell Oct 27, 2024
8f7a177
feat: Localize some strings
maznnwell Oct 27, 2024
26dc9b4
refactor: Make custom exceptions extend from DashboardCubitException
maznnwell Oct 27, 2024
3d30b3b
refactor: Restructure new code in a single folder
maznnwell Oct 27, 2024
1608ca7
chore: Move node_sync_status inside features folder
maznnwell Oct 28, 2024
bdd9f03
chore: Improve documentation
maznnwell Oct 28, 2024
7eadb62
feat: Add always_specify_types to the linter rules and run dart fix
maznnwell Oct 28, 2024
87dc80d
chore: Solve linter hints in rearchitecture folder
maznnwell Oct 28, 2024
161a300
chore: Improve documentation
maznnwell Oct 28, 2024
d4a77ee
chore: Create and use the state_copy_with documentation template
maznnwell Oct 28, 2024
68ba189
feat: transfer BLoC rearchitecture complete. added receive_transactio…
kossmmos Oct 29, 2024
5309887
feat: Add tests for delegation cubit
maznnwell Oct 29, 2024
03667b3
Merge remote-tracking branch 'upstream/rearchitecture-dashboard' into…
kossmmos Oct 29, 2024
2eb4888
feat: Add asserts for the TimerState class
maznnwell Oct 29, 2024
a1bbf98
feat: Restructure exceptions
maznnwell Oct 29, 2024
e811080
feat: Improve error logging
maznnwell Oct 29, 2024
6c4b345
chore: Update Zenon SDK
maznnwell Oct 29, 2024
ce9538c
chore: Delete flutter_lints dependency
maznnwell Oct 29, 2024
8171b51
chore: Update dependencies
maznnwell Oct 29, 2024
4d48aad
feat: Change the interval at which the node sync status is fetched
maznnwell Oct 29, 2024
2d59eb9
chore: Rename and change location of a refresh interval constant
maznnwell Oct 29, 2024
697614d
feat: Don't emit the loading state if the current one has a success s…
maznnwell Oct 29, 2024
4d1da7a
feat: Add required named parameters to the TimerCubit constructor
maznnwell Oct 29, 2024
65981a4
Merge remote-tracking branch 'refs/remotes/upstream/rearchitecture-da…
kossmmos Oct 30, 2024
5af5ac5
feat: Run dart format in rearchitecture folder
maznnwell Oct 30, 2024
af2589d
feat: Delete the CubitException class
maznnwell Oct 30, 2024
802fb50
testing dashboard wip
kossmmos Oct 30, 2024
f58d03e
Merge remote-tracking branch 'upstream/rearchitecture-dashboard' into…
kossmmos Oct 30, 2024
b307432
chore: Improve documentation
maznnwell Oct 30, 2024
b7a91f4
testing dashboard wip
kossmmos Oct 30, 2024
df5d334
feat: Create constants for specific UI gaps
maznnwell Oct 30, 2024
9ea3ac3
feat: dashboard unit testing added
kossmmos Oct 31, 2024
70121a5
removed unused import
kossmmos Oct 31, 2024
caeb347
Merge remote-tracking branch 'upstream/rearchitecture-dashboard' into…
kossmmos Oct 31, 2024
999734f
node sync status tests added
kossmmos Oct 31, 2024
20ccb84
feat: Create the new app themes and improve the UI of the back of the…
maznnwell Oct 31, 2024
3317896
feat: Create a cubit for hiding the front widget of the NewCardScaffold
maznnwell Nov 1, 2024
57dc0fb
feat: Log errors
maznnwell Nov 1, 2024
50a292f
feat: Make password field obscure text by default
maznnwell Nov 1, 2024
b372596
feat: Create the newTheme and isDarkMode getters to the BuildContextE…
maznnwell Nov 1, 2024
4580937
feat: Rename local variable
maznnwell Nov 1, 2024
fd6f942
feat: Delete the font specification from the new themes
maznnwell Nov 1, 2024
7805614
fix: Getting setting and getting the new theme
maznnwell Nov 1, 2024
ad30daa
chore: Rename 'newTheme' getter to 'theme'
maznnwell Nov 1, 2024
bed8cd3
feat: Adapt widgets to the new theme data
maznnwell Nov 1, 2024
de68e9b
chore: Rename getter 'theme' to 'themeData'
maznnwell Nov 1, 2024
1693811
Merge pull request #5 from kossmmos/rearchitecture-dashboard
maznnwell Nov 1, 2024
db93609
refactor: Cubit initializations
maznnwell Nov 1, 2024
14d5699
chore: Use documentation templates for cubit state's fromJson and toJson
maznnwell Nov 1, 2024
2885d89
fix: Some tests
maznnwell Nov 1, 2024
9af0054
chore: Improve documentation
maznnwell Nov 4, 2024
0d9fe75
feat: Align the text field and the button on the center axis
maznnwell Nov 4, 2024
3b06a48
chore: Repair dart analysis hints
maznnwell Nov 5, 2024
bde8cd1
feat: Remove styling from left side chart titles and use the default …
maznnwell Nov 30, 2024
a5a0b85
feat: Revert some Windows changes
maznnwell Dec 1, 2024
27dfced
feat: Associated a custom URL deep linking scheme with the app - on W…
maznnwell Dec 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions .metadata
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
channel: stable
revision: "2663184aa79047d0a33a14a3b607954f8fdd8730"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
- platform: windows
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730

# User provided section

Expand Down
53 changes: 17 additions & 36 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,21 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
include: package:very_good_analysis/analysis_options.yaml

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
analyzer:
exclude:
- "**/*.g.dart"
language:
# I've disabled it so as to make the code compile without
# strict type-checking
strict-casts: false
strict-inference: false
strict-raw-types: false

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
avoid_print: true # Uncomment to disable the `avoid_print` rule
prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
cancel_subscriptions: true
close_sinks: true
comment_references: true
one_member_abstracts: true
always_use_package_imports: true
avoid_empty_else: true
avoid_slow_async_io: true
avoid_web_libraries_in_flutter: true
control_flow_in_finally: true
empty_statements: true
depend_on_referenced_packages: true
secure_pubspec_urls: true
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
# Always specifying types will make an unfamiliar codebase more readable for a new developer
# More details about the rule:
# https://gist.github.com/rydmike/fdb53ddd933c37d20e6f3188a936cd4c#file-analysis_options-yaml-L138
always_specify_types: true
# This rule is in contradiction with always_specify_types, so it must be disabled if the other
# one is enabled
omit_local_variable_types: false
3 changes: 3 additions & 0 deletions l10n.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
1 change: 0 additions & 1 deletion lib/blocs/accelerator/accelerator.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
library accelerator;

export 'accelerator_balance_bloc.dart';
export 'create_phase_bloc.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/blocs/accelerator/accelerator_balance_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AcceleratorBalanceBloc extends BaseBloc<AccountInfo?> {
Future<void> getAcceleratorBalance() async {
try {
addEvent(null);
AccountInfo accountInfo = await zenon!.ledger.getAccountInfoByAddress(
final AccountInfo accountInfo = await zenon!.ledger.getAccountInfoByAddress(
acceleratorAddress,
);
if (accountInfo.qsr()! > BigInt.zero ||
Expand Down
8 changes: 3 additions & 5 deletions lib/blocs/accelerator/create_phase_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CreatePhaseBloc extends BaseBloc<AccountBlockTemplate?> {
) async {
try {
addEvent(null);
AccountBlockTemplate transactionParams =
final AccountBlockTemplate transactionParams =
zenon!.embedded.accelerator.addPhase(
id,
name,
Expand All @@ -25,12 +25,10 @@ class CreatePhaseBloc extends BaseBloc<AccountBlockTemplate?> {
);
AccountBlockUtils.createAccountBlock(transactionParams, 'create phase')
.then(
(block) => addEvent(block),
addEvent,
)
.onError(
(error, stackTrace) {
addError(error, stackTrace);
},
addError,
);
} catch (e, stackTrace) {
addError(e, stackTrace);
Expand Down
10 changes: 5 additions & 5 deletions lib/blocs/accelerator/create_project_bloc.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:async';

import 'package:zenon_syrius_wallet_flutter/blocs/blocs.dart';
import 'package:zenon_syrius_wallet_flutter/main.dart';
import 'package:zenon_syrius_wallet_flutter/utils/utils.dart';
Expand All @@ -13,7 +15,7 @@ class CreateProjectBloc extends BaseBloc<AccountBlockTemplate?> {
) {
try {
addEvent(null);
AccountBlockTemplate transactionParams =
final AccountBlockTemplate transactionParams =
zenon!.embedded.accelerator.createProject(
name,
description,
Expand All @@ -25,14 +27,12 @@ class CreateProjectBloc extends BaseBloc<AccountBlockTemplate?> {
transactionParams,
'creating project',
).then(
(block) {
(AccountBlockTemplate block) {
ZenonAddressUtils.refreshBalance();
addEvent(block);
},
).onError(
(error, stackTrace) {
addError(error, stackTrace);
},
addError,
);
} catch (e, stackTrace) {
addError(e, stackTrace);
Expand Down
Loading