Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ğecko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Ğecko
Commits
9983ea9f
Commit
9983ea9f
authored
2 years ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
new BalanceBuilder Widget
parent
0ab955b2
No related branches found
Branches containing commit
Tags
v0.1.7+78
Tags containing commit
No related merge requests found
Pipeline
#18292
waiting for manual action
Stage: format
Stage: build_and_test
Stage: package
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/screens/myWallets/wallets_home.dart
+44
-28
44 additions, 28 deletions
lib/screens/myWallets/wallets_home.dart
with
44 additions
and
28 deletions
lib/screens/myWallets/wallets_home.dart
+
44
−
28
View file @
9983ea9f
...
...
@@ -238,18 +238,23 @@ class WalletsHome extends StatelessWidget {
WalletData
?
defaultWallet
=
myWalletProvider
.
getDefaultWallet
();
final
screenWidth
=
MediaQuery
.
of
(
context
)
.
size
.
width
;
int
nTule
=
2
;
int
nTule
;
if
(
screenWidth
>
=
900
)
{
nTule
=
4
;
}
else
if
(
screenWidth
>
=
650
)
{
nTule
=
3
;
}
else
{
nTule
=
2
;
}
// Offset followDragAnchorStrategy(
// Draggable<Object> d, BuildContext context, Offset point) {
// return Offset(d.feedbackOffset.dx - 30, d.feedbackOffset.dy - 0);
// }
showTutorial
();
// Future.delayed(const Duration(seconds: 1), showTutorial);
return
CustomScrollView
(
slivers:
<
Widget
>[
const
SliverToBoxAdapter
(
child:
SizedBox
(
height:
20
)),
SliverGrid
.
count
(
...
...
@@ -375,10 +380,9 @@ class WalletsHome extends StatelessWidget {
),
)),
Stack
(
children:
<
Widget
>[
balanceBuilder
(
context
,
repository
.
address
,
repository
.
address
==
BalanceBuilder
(
address:
repository
.
address
,
isDefault:
repository
.
address
==
defaultWallet
.
address
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
...
...
@@ -434,29 +438,6 @@ class WalletsHome extends StatelessWidget {
]);
}
Widget
balanceBuilder
(
context
,
String
address
,
bool
isDefault
)
{
return
Container
(
width:
double
.
infinity
,
color:
isDefault
?
orangeC
:
yellowC
,
child:
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
5
,
right:
5
,
top:
38
,
bottom:
10
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Opacity
(
opacity:
0.7
,
child:
Balance
(
address:
address
,
size:
16
,
color:
isDefault
?
Colors
.
white
:
Colors
.
black
,
loadingColor:
isDefault
?
yellowC
:
orangeC
),
)
],
)),
);
}
Widget
addNewDerivation
(
context
)
{
final
myWalletProvider
=
Provider
.
of
<
MyWalletsProvider
>(
context
);
...
...
@@ -518,6 +499,41 @@ class WalletsHome extends StatelessWidget {
}
}
class
BalanceBuilder
extends
StatelessWidget
{
const
BalanceBuilder
({
Key
?
key
,
required
this
.
address
,
required
this
.
isDefault
,
})
:
super
(
key:
key
);
final
String
address
;
final
bool
isDefault
;
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
width:
double
.
infinity
,
color:
isDefault
?
orangeC
:
yellowC
,
child:
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
5
,
right:
5
,
top:
38
,
bottom:
10
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Opacity
(
opacity:
0.7
,
child:
Balance
(
address:
address
,
size:
16
,
color:
isDefault
?
Colors
.
white
:
Colors
.
black
,
loadingColor:
isDefault
?
yellowC
:
orangeC
),
)
],
)),
);
}
}
class
CustomClipperOval
extends
CustomClipper
<
Rect
>
{
@override
Rect
getClip
(
Size
size
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment