feat:riverpod 迁移 PartyRoomUI

This commit is contained in:
xkeyC 2024-03-10 17:25:26 +08:00
parent cf6ab55dd0
commit 1318b67be8
2 changed files with 43 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import 'package:starcitizen_doctor/common/conf/const_conf.dart';
import 'package:starcitizen_doctor/provider/aria2c.dart'; import 'package:starcitizen_doctor/provider/aria2c.dart';
import 'package:starcitizen_doctor/ui/home/home_ui.dart'; import 'package:starcitizen_doctor/ui/home/home_ui.dart';
import 'package:starcitizen_doctor/ui/home/home_ui_model.dart'; import 'package:starcitizen_doctor/ui/home/home_ui_model.dart';
import 'package:starcitizen_doctor/ui/party_room/party_room_ui.dart';
import 'package:starcitizen_doctor/widgets/widgets.dart'; import 'package:starcitizen_doctor/widgets/widgets.dart';
import 'package:window_manager/window_manager.dart'; import 'package:window_manager/window_manager.dart';
@ -116,6 +117,8 @@ class IndexUI extends HookConsumerWidget {
switch (value) { switch (value) {
case 0: case 0:
return const HomeUI(); return const HomeUI();
case 1:
return const PartyRoomUI();
default: default:
return Center( return Center(
child: Text("UnimplPage $value"), child: Text("UnimplPage $value"),

View File

@ -0,0 +1,40 @@
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:url_launcher/url_launcher_string.dart';
class PartyRoomUI extends HookConsumerWidget {
const PartyRoomUI({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
return Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Text(
"联机大厅,敬请期待 ",
style: TextStyle(fontSize: 20),
),
const SizedBox(height: 12),
GestureDetector(
onTap: () {
launchUrlString("https://wj.qq.com/s2/14112124/f4c8/");
},
child: const Row(
mainAxisSize: MainAxisSize.min,
children: [
Text("诚邀您参与 "),
Text(
"问卷调查。",
style: TextStyle(
color: Colors.blue,
),
)
],
),
),
],
),
);
}
}