Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- body: Column(
- children: <Widget>[
- _buildCarousel(context, 0, mnemonics.length, mnemonics),
- new Expanded(
- child: new Container(
- color: Colors.white,
- child: new Center(
- child: y==0 ? getToken != null
- ? new Container(
- child: Column(
- children: <Widget>[
- new Flexible(
- child: ListView.builder(
- itemCount: getToken.tokens != null
- ? getToken.tokens.length
- : 1,
- itemBuilder:
- (BuildContext context,
- int itemIndex) {
- if (itemIndex == 0) {
- return new Card(
- elevation: 15,
- margin:
- EdgeInsets.all(10),
- child: Stack(children: <
- Widget>[
- Container(
- decoration: new BoxDecoration(
- border: new Border(
- left: BorderSide(
- color: Colors
- .green,
- width:
- 3.5,
- style: BorderStyle
- .solid))),
- child: Column(
- mainAxisAlignment:
- MainAxisAlignment
- .start,
- crossAxisAlignment:
- CrossAxisAlignment
- .start,
- children: <Widget>[
- SizedBox(
- height: 20),
- Row(children: <
- Widget>[
- SizedBox(
- width: 10,
- ),
- Image.asset(
- "assets/icons/ethereum.png",
- fit: BoxFit
- .fill,
- alignment:
- Alignment
- .centerLeft,
- height: 63,
- width: 40),
- SizedBox(
- width: 10,
- ),
- Column(
- mainAxisAlignment:
- MainAxisAlignment
- .start,
- crossAxisAlignment:
- CrossAxisAlignment
- .start,
- children: <
- Widget>[
- Text(
- "Ethereum (ETH)",
- style:
- new TextStyle(fontSize: 20)),
- Text(
- "${(getToken.eTH.balance).toStringAsFixed(5)} ETH",
- style:
- TextStyle(fontWeight: FontWeight.bold))
- ])
- ]),
- SizedBox(
- height: 20),
- ],
- ),
- )
- ]));
- } else {
- return new Card(
- elevation: 8,
- margin:
- EdgeInsets.all(10),
- child: Stack(children: <
- Widget>[
- Container(
- decoration: new BoxDecoration(
- border: new Border(
- left: BorderSide(
- color: Colors
- .red,
- width:
- 3.5,
- style: BorderStyle
- .solid))),
- child: Column(
- mainAxisAlignment:
- MainAxisAlignment
- .start,
- crossAxisAlignment:
- CrossAxisAlignment
- .start,
- children: <Widget>[
- SizedBox(
- height: 20),
- Row(children: <
- Widget>[
- SizedBox(
- width: 10,
- ),
- Text(
- "${getToken.tokens[itemIndex - 1].tokenInfo.name} (${getToken.tokens[itemIndex - 1].tokenInfo.symbol})",
- style: new TextStyle(
- fontSize:
- 20))
- ]),
- Row(children: <
- Widget>[
- SizedBox(
- width: 10),
- Text(
- "${(getToken.tokens[itemIndex - 1].balance / math.pow(10, getToken.tokens[itemIndex - 1].tokenInfo.decimals)).toStringAsFixed(5)} ${getToken.tokens[itemIndex - 1].tokenInfo.symbol}",
- style: TextStyle(
- fontWeight:
- FontWeight.bold))
- ]),
- SizedBox(
- height: 20),
- ],
- ),
- )
- ]));
- }
- },
- ))
- ],
- ))
- :new Text(
- "Error: Something went wrong (EC2876)") :new CircularProgressIndicator() )
- ))
- ],
- ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement