Browse Source

style : 更新页面布局

dev
徐振升 3 days ago
parent
commit
3bf85e0495
  1. 2
      lib/modules/home/controllers/home_controller.dart
  2. 10
      lib/modules/home/views/home_page.dart
  3. 9
      lib/modules/problem/views/widgets/problem_card.dart

2
lib/modules/home/controllers/home_controller.dart

@ -9,7 +9,7 @@ class HomeController extends GetxController {
// //
final List<Widget> pages = [ final List<Widget> pages = [
const Center(child: Text('首页内容')), // const Center(child: Text('首页内容')),
const ProblemPage(), // 使 const const ProblemPage(), // 使 const
const MyPage(), const MyPage(),
]; ];

10
lib/modules/home/views/home_page.dart

@ -14,11 +14,11 @@ class HomePage extends GetView<HomeController> {
selectedIndex: controller.selectedIndex.value, selectedIndex: controller.selectedIndex.value,
onDestinationSelected: controller.changeIndex, // onDestinationSelected: controller.changeIndex, //
destinations: const [ destinations: const [
NavigationDestination( // NavigationDestination(
icon: Icon(Icons.home_outlined), // icon: Icon(Icons.home_outlined),
selectedIcon: Icon(Icons.home), // selectedIcon: Icon(Icons.home),
label: '首页', // label: '首页',
), // ),
NavigationDestination( NavigationDestination(
icon: Icon(Icons.description_outlined), icon: Icon(Icons.description_outlined),
selectedIcon: Icon(Icons.description), selectedIcon: Icon(Icons.description),

9
lib/modules/problem/views/widgets/problem_card.dart

@ -74,12 +74,13 @@ class ProblemCard extends StatelessWidget {
SizedBox(width: 16.w), SizedBox(width: 16.w),
Icon(Icons.access_time, color: Colors.grey, size: 16.h), Icon(Icons.access_time, color: Colors.grey, size: 16.h),
SizedBox(width: 8.w), SizedBox(width: 8.w),
SizedBox( Expanded(
width: 100.w,
child: Text( child: Text(
DateFormat('yyyy-MM-dd HH:mm').format(problem.creationTime), DateFormat(
'yyyy-MM-dd HH:mm:ss',
).format(problem.creationTime),
style: TextStyle(fontSize: 12.sp), style: TextStyle(fontSize: 12.sp),
overflow: TextOverflow.ellipsis, // overflow: TextOverflow.ellipsis,
), ),
), ),
], ],

Loading…
Cancel
Save