-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add farm screen with only listing dummy data
- Loading branch information
1 parent
e4b8ceb
commit 36acd48
Showing
1 changed file
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:threebotlogin/models/farm.dart'; | ||
import 'package:threebotlogin/widgets/farm_item.dart'; | ||
import 'package:threebotlogin/widgets/layout_drawer.dart'; | ||
|
||
class FarmScreen extends StatefulWidget { | ||
const FarmScreen({super.key}); | ||
|
||
@override | ||
State<FarmScreen> createState() => _FarmScreenState(); | ||
} | ||
|
||
class _FarmScreenState extends State<FarmScreen> { | ||
final List<Farm> farms = [ | ||
Farm( | ||
name: 'Hamada', | ||
walletAddress: 'GCNHLX2ZTX2HDXCIQATZRSIHK2ECKEMKZCMSMIWBOTS2DZYUJBMHNXJA', | ||
tfchainWalletSecret: | ||
'miss secret news run cliff lens exist clerk lucky cube fall soldier', | ||
walletName: 'Farming wallet', | ||
twinId: '26', | ||
farmId: '56', | ||
nodes: [ | ||
Node( | ||
nodeId: '88', | ||
status: NodeStatus.Up, | ||
), | ||
], | ||
), | ||
Farm( | ||
name: 'My Farm', | ||
walletAddress: 'GCNHLX2ZTX2HDXCIQATZRSIHK2ECKEMKZCMSMIWBOTS2DZYUJBMHNXJA', | ||
tfchainWalletSecret: | ||
'miss secret news run cliff lens exist clerk lucky cube fall soldier', | ||
walletName: 'Farming wallet', | ||
twinId: '26', | ||
farmId: '154', | ||
nodes: [ | ||
Node( | ||
nodeId: '193', | ||
status: NodeStatus.Down, | ||
), | ||
Node( | ||
nodeId: '493', | ||
status: NodeStatus.Standby, | ||
), | ||
Node( | ||
nodeId: '584', | ||
status: NodeStatus.Up, | ||
), | ||
], | ||
), | ||
Farm( | ||
name: 'My Animals', | ||
walletAddress: 'GCNHLX2ZTX2HDXCIQATZRSIHK2ECKEMKZCMSMIWBOTS2DZYUJBMHNXJA', | ||
tfchainWalletSecret: | ||
'miss secret news run cliff lens exist clerk lucky cube fall soldier', | ||
walletName: 'Farming wallet', | ||
twinId: '26', | ||
farmId: '389', | ||
nodes: [ | ||
Node( | ||
nodeId: '1034', | ||
status: NodeStatus.Standby, | ||
), | ||
Node( | ||
nodeId: '1203', | ||
status: NodeStatus.Up, | ||
), | ||
], | ||
), | ||
]; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return LayoutDrawer( | ||
titleText: 'Farms', | ||
content: ListView( | ||
children: [for (final farm in farms) FarmItemWidget(farm: farm)]), | ||
); | ||
} | ||
} |