Skip to content

Commit

Permalink
move DC to home center
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhuachuang committed Nov 3, 2021
1 parent d27aabc commit 6ec0704
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions lib/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,53 +229,53 @@ class _HomeListState extends State<HomeList> {
_SessionWidget(session: sessions[allKeys[index]]!),
),
ListView.builder(
itemCount: INNER_SERVICES.length,
itemCount: HOME_DIRECTORY.length,
itemBuilder: (BuildContext ctx, int index) {
final params = INNER_SERVICES[index].params(lang);
final params = HOME_DIRECTORY[index].params(lang);
return ListTile(
leading: Container(
width: 40.0,
height: 40.0,
padding: const EdgeInsets.all(6.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
),
child: Image.asset(params[2]),
),
title: Text(params[0], style: TextStyle(fontSize: 16.0)),
subtitle: Text(params[1], style: TextStyle(fontSize: 12.0)),
leading: Icon(params[0], color: Color(0xFF6174FF)),
title: Text(params[1], style: TextStyle(fontSize: 16.0)),
trailing: Icon(Icons.keyboard_arrow_right),
onTap: () {
final widget = INNER_SERVICES[index].callback();
final widget = FilesList(path: params[2]);
if (widget != null) {
if (isDesktop) {
Provider.of<AccountProvider>(context, listen: false).updateActivedWidget(widget);
} else {
Navigator.push(context, MaterialPageRoute(builder: (_) => widget));
}
}
},
}
);
}
),
ListView.builder(
itemCount: HOME_DIRECTORY.length,
itemCount: INNER_SERVICES.length,
itemBuilder: (BuildContext ctx, int index) {
final params = HOME_DIRECTORY[index].params(lang);
final params = INNER_SERVICES[index].params(lang);
return ListTile(
leading: Icon(params[0], color: Color(0xFF6174FF)),
title: Text(params[1], style: TextStyle(fontSize: 16.0)),
leading: Container(
width: 40.0,
height: 40.0,
padding: const EdgeInsets.all(6.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
),
child: Image.asset(params[2]),
),
title: Text(params[0], style: TextStyle(fontSize: 16.0)),
subtitle: Text(params[1], style: TextStyle(fontSize: 12.0)),
trailing: Icon(Icons.keyboard_arrow_right),
onTap: () {
final widget = FilesList(path: params[2]);
final widget = INNER_SERVICES[index].callback();
if (widget != null) {
if (isDesktop) {
Provider.of<AccountProvider>(context, listen: false).updateActivedWidget(widget);
} else {
Navigator.push(context, MaterialPageRoute(builder: (_) => widget));
}
}
}
},
);
}
),
Expand All @@ -300,14 +300,14 @@ class _HomeListState extends State<HomeList> {
inactiveColor: Colors.grey,
),
BottomNavyBarItem(
icon: Icon(Icons.apps),
title: Text(lang.services, style: TextStyle(fontSize: 15.0)),
icon: Icon(Icons.source),
title: Text(lang.dataCenter, style: TextStyle(fontSize: 15.0)),
activeColor: Color(0xFF6174FF),
inactiveColor: Colors.grey,
),
BottomNavyBarItem(
icon: Icon(Icons.source),
title: Text(lang.dataCenter, style: TextStyle(fontSize: 15.0)),
icon: Icon(Icons.apps),
title: Text(lang.services, style: TextStyle(fontSize: 15.0)),
activeColor: Color(0xFF6174FF),
inactiveColor: Colors.grey,
),
Expand Down

0 comments on commit 6ec0704

Please sign in to comment.