import 'package:flutter/material.dart'; import 'package:common_project/common_project.dart'; import 'package:module_chat/view_model/test_games_web_cubit.dart'; /// @class : TestWebviewGame /// @date : 2022/1/25 3:32 下午 /// @name : rico /// @description : 测试游戏页面 class TestWebviewGame extends StatefulWidget { TextEditingController editingController = TextEditingController(); @override _TestWebviewGame createState() => _TestWebviewGame(); } class _TestWebviewGame extends State { @override Widget build(BuildContext context) { return Scaffold( body: BlocProvider( create: (context) => TestGamesWebCubit(), child: Builder( builder: (context){ TestGamesWebCubit bloc = BlocProvider.of(context); return Stack( children: [ Container(child: ImageUtil.loadImage('assets/images/chat_room_background_test.jpg',package: ModuleName.Module_chat,width: Sizes.width,height: Sizes.height),), Align( alignment: Alignment.center, child: InkWell( onTap: (){ bloc.openWeb(context, bloc.state.gameUrl); }, child: Container( width: 300.w, height: 100.w, color: Colors.red, alignment: Alignment.center, margin: EdgeInsets.only(right: 80.w), child: Text(' 打开游戏'), ), ), ), ], ); }, ), ), ); } }