优化在线游戏状态管理,重命名当前玩家信息字段为 myPlayerInfo,简化代码格式,增强可读性;修复玩家符号动态分配逻辑,确保玩家符号不再硬编码为 O。

This commit is contained in:
2025-06-24 19:49:39 +08:00
parent 996918669d
commit 2fc849d74f
7 changed files with 171 additions and 141 deletions

View File

@ -16,12 +16,7 @@ part 'online_game.freezed.dart';
part 'online_game.g.dart';
/// 连接状态的枚举
enum ConnectionStatus {
initial,
connecting,
connected,
disconnected,
}
enum ConnectionStatus { initial, connecting, connected, disconnected }
/// 在线游戏的整体状态使用Freezed进行状态管理
@freezed
@ -31,7 +26,7 @@ class OnlineGameState with _$OnlineGameState {
@Default(ConnectionStatus.initial) ConnectionStatus connectionStatus,
RoomInfo? roomInfo,
String? error,
PlayerInfo? currentPlayer,
PlayerInfo? myPlayerInfo,
Player? mySymbol,
@Default(false) bool isJoiningRoom,
}) = _OnlineGameState;
@ -75,8 +70,10 @@ class OnlineGame extends _$OnlineGame {
String _generatePlayerId() {
final random = Random();
const chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
return List.generate(12, (index) => chars[random.nextInt(chars.length)])
.join();
return List.generate(
12,
(index) => chars[random.nextInt(chars.length)],
).join();
}
/// 连接到服务器
@ -90,7 +87,9 @@ class OnlineGame extends _$OnlineGame {
if (_isDisposed) return;
state = state.copyWith(
connectionStatus: ConnectionStatus.connecting, error: null);
connectionStatus: ConnectionStatus.connecting,
error: null,
);
_playerId ??= _generatePlayerId();
final stream = await _webSocketService.connect(
@ -172,7 +171,8 @@ class OnlineGame extends _$OnlineGame {
_socketSubscription = null;
if (!_isDisposed) {
state = const OnlineGameState(
connectionStatus: ConnectionStatus.disconnected);
connectionStatus: ConnectionStatus.disconnected,
);
}
}
@ -193,8 +193,9 @@ class OnlineGame extends _$OnlineGame {
connect(); // 尝试连接
return;
}
final name =
playerName.trim().isEmpty ? RandomNames(Zone.us).name() : playerName;
final name = playerName.trim().isEmpty
? RandomNames(Zone.us).name()
: playerName;
_sendMessage(MessageType.createRoom, data: {'playerName': name});
}
@ -205,10 +206,14 @@ class OnlineGame extends _$OnlineGame {
return;
}
state = state.copyWith(isJoiningRoom: true, error: null);
final name =
playerName.trim().isEmpty ? RandomNames(Zone.us).name() : playerName;
_sendMessage(MessageType.joinRoom,
roomId: roomId, data: {'playerName': name});
final name = playerName.trim().isEmpty
? RandomNames(Zone.us).name()
: playerName;
_sendMessage(
MessageType.joinRoom,
roomId: roomId,
data: {'playerName': name},
);
// 超时处理
Timer(const Duration(seconds: 10), () {
@ -236,8 +241,11 @@ class OnlineGame extends _$OnlineGame {
playerId: _playerId!,
timestamp: DateTime.now().millisecondsSinceEpoch,
);
_sendMessage(MessageType.gameMove,
roomId: state.roomInfo!.roomId, data: moveData.toJson());
_sendMessage(
MessageType.gameMove,
roomId: state.roomInfo!.roomId,
data: moveData.toJson(),
);
}
void resetGame() {
@ -251,17 +259,23 @@ class OnlineGame extends _$OnlineGame {
// --- 消息处理 ---
void _sendMessage(MessageType type,
{String? roomId, Map<String, dynamic>? data}) {
void _sendMessage(
MessageType type, {
String? roomId,
Map<String, dynamic>? data,
}) {
if (_playerId == null ||
state.connectionStatus != ConnectionStatus.connected) return;
_webSocketService.sendMessage(NetworkMessage(
type: type,
playerId: _playerId!,
roomId: roomId,
data: data,
timestamp: DateTime.now().millisecondsSinceEpoch,
));
state.connectionStatus != ConnectionStatus.connected)
return;
_webSocketService.sendMessage(
NetworkMessage(
type: type,
playerId: _playerId!,
roomId: roomId,
data: data,
timestamp: DateTime.now().millisecondsSinceEpoch,
),
);
}
void _handleRawMessage(dynamic data) {
@ -285,7 +299,7 @@ class OnlineGame extends _$OnlineGame {
_sendMessage(MessageType.pong);
return;
}
state = _getNextState(message);
} catch (e, stackTrace) {
if (kDebugMode) {
@ -300,11 +314,13 @@ class OnlineGame extends _$OnlineGame {
case MessageType.roomCreated:
case MessageType.roomJoined:
final roomInfo = RoomInfo.fromJson(message.data!['roomInfo']);
final me = roomInfo.players.firstWhere((p) => p.playerId == _playerId,
orElse: () => throw Exception("Could not find myself in player list"));
final me = roomInfo.players.firstWhere(
(p) => p.playerId == _playerId,
orElse: () => throw Exception("Could not find myself in player list"),
);
return state.copyWith(
roomInfo: roomInfo,
currentPlayer: me,
myPlayerInfo: me,
mySymbol: me.playerSymbol,
isJoiningRoom: false,
error: null,
@ -314,7 +330,7 @@ class OnlineGame extends _$OnlineGame {
case MessageType.roomLeft:
return state.copyWith(
roomInfo: null,
currentPlayer: null,
myPlayerInfo: null,
mySymbol: null,
gameState: const GameState(),
);
@ -343,10 +359,7 @@ class OnlineGame extends _$OnlineGame {
case MessageType.error:
final errorMessage =
message.error ?? message.data?['message'] ?? '来自服务器的未知错误';
return state.copyWith(
error: errorMessage,
isJoiningRoom: false,
);
return state.copyWith(error: errorMessage, isJoiningRoom: false);
default:
return state;

View File

@ -21,7 +21,7 @@ mixin _$OnlineGameState {
ConnectionStatus get connectionStatus => throw _privateConstructorUsedError;
RoomInfo? get roomInfo => throw _privateConstructorUsedError;
String? get error => throw _privateConstructorUsedError;
PlayerInfo? get currentPlayer => throw _privateConstructorUsedError;
PlayerInfo? get myPlayerInfo => throw _privateConstructorUsedError;
Player? get mySymbol => throw _privateConstructorUsedError;
bool get isJoiningRoom => throw _privateConstructorUsedError;
@ -44,14 +44,14 @@ abstract class $OnlineGameStateCopyWith<$Res> {
ConnectionStatus connectionStatus,
RoomInfo? roomInfo,
String? error,
PlayerInfo? currentPlayer,
PlayerInfo? myPlayerInfo,
Player? mySymbol,
bool isJoiningRoom,
});
$GameStateCopyWith<$Res> get gameState;
$RoomInfoCopyWith<$Res>? get roomInfo;
$PlayerInfoCopyWith<$Res>? get currentPlayer;
$PlayerInfoCopyWith<$Res>? get myPlayerInfo;
}
/// @nodoc
@ -73,7 +73,7 @@ class _$OnlineGameStateCopyWithImpl<$Res, $Val extends OnlineGameState>
Object? connectionStatus = null,
Object? roomInfo = freezed,
Object? error = freezed,
Object? currentPlayer = freezed,
Object? myPlayerInfo = freezed,
Object? mySymbol = freezed,
Object? isJoiningRoom = null,
}) {
@ -95,9 +95,9 @@ class _$OnlineGameStateCopyWithImpl<$Res, $Val extends OnlineGameState>
? _value.error
: error // ignore: cast_nullable_to_non_nullable
as String?,
currentPlayer: freezed == currentPlayer
? _value.currentPlayer
: currentPlayer // ignore: cast_nullable_to_non_nullable
myPlayerInfo: freezed == myPlayerInfo
? _value.myPlayerInfo
: myPlayerInfo // ignore: cast_nullable_to_non_nullable
as PlayerInfo?,
mySymbol: freezed == mySymbol
? _value.mySymbol
@ -140,13 +140,13 @@ class _$OnlineGameStateCopyWithImpl<$Res, $Val extends OnlineGameState>
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$PlayerInfoCopyWith<$Res>? get currentPlayer {
if (_value.currentPlayer == null) {
$PlayerInfoCopyWith<$Res>? get myPlayerInfo {
if (_value.myPlayerInfo == null) {
return null;
}
return $PlayerInfoCopyWith<$Res>(_value.currentPlayer!, (value) {
return _then(_value.copyWith(currentPlayer: value) as $Val);
return $PlayerInfoCopyWith<$Res>(_value.myPlayerInfo!, (value) {
return _then(_value.copyWith(myPlayerInfo: value) as $Val);
});
}
}
@ -165,7 +165,7 @@ abstract class _$$OnlineGameStateImplCopyWith<$Res>
ConnectionStatus connectionStatus,
RoomInfo? roomInfo,
String? error,
PlayerInfo? currentPlayer,
PlayerInfo? myPlayerInfo,
Player? mySymbol,
bool isJoiningRoom,
});
@ -175,7 +175,7 @@ abstract class _$$OnlineGameStateImplCopyWith<$Res>
@override
$RoomInfoCopyWith<$Res>? get roomInfo;
@override
$PlayerInfoCopyWith<$Res>? get currentPlayer;
$PlayerInfoCopyWith<$Res>? get myPlayerInfo;
}
/// @nodoc
@ -196,7 +196,7 @@ class __$$OnlineGameStateImplCopyWithImpl<$Res>
Object? connectionStatus = null,
Object? roomInfo = freezed,
Object? error = freezed,
Object? currentPlayer = freezed,
Object? myPlayerInfo = freezed,
Object? mySymbol = freezed,
Object? isJoiningRoom = null,
}) {
@ -218,9 +218,9 @@ class __$$OnlineGameStateImplCopyWithImpl<$Res>
? _value.error
: error // ignore: cast_nullable_to_non_nullable
as String?,
currentPlayer: freezed == currentPlayer
? _value.currentPlayer
: currentPlayer // ignore: cast_nullable_to_non_nullable
myPlayerInfo: freezed == myPlayerInfo
? _value.myPlayerInfo
: myPlayerInfo // ignore: cast_nullable_to_non_nullable
as PlayerInfo?,
mySymbol: freezed == mySymbol
? _value.mySymbol
@ -244,7 +244,7 @@ class _$OnlineGameStateImpl extends _OnlineGameState
this.connectionStatus = ConnectionStatus.initial,
this.roomInfo,
this.error,
this.currentPlayer,
this.myPlayerInfo,
this.mySymbol,
this.isJoiningRoom = false,
}) : super._();
@ -260,7 +260,7 @@ class _$OnlineGameStateImpl extends _OnlineGameState
@override
final String? error;
@override
final PlayerInfo? currentPlayer;
final PlayerInfo? myPlayerInfo;
@override
final Player? mySymbol;
@override
@ -269,7 +269,7 @@ class _$OnlineGameStateImpl extends _OnlineGameState
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'OnlineGameState(gameState: $gameState, connectionStatus: $connectionStatus, roomInfo: $roomInfo, error: $error, currentPlayer: $currentPlayer, mySymbol: $mySymbol, isJoiningRoom: $isJoiningRoom)';
return 'OnlineGameState(gameState: $gameState, connectionStatus: $connectionStatus, roomInfo: $roomInfo, error: $error, myPlayerInfo: $myPlayerInfo, mySymbol: $mySymbol, isJoiningRoom: $isJoiningRoom)';
}
@override
@ -281,7 +281,7 @@ class _$OnlineGameStateImpl extends _OnlineGameState
..add(DiagnosticsProperty('connectionStatus', connectionStatus))
..add(DiagnosticsProperty('roomInfo', roomInfo))
..add(DiagnosticsProperty('error', error))
..add(DiagnosticsProperty('currentPlayer', currentPlayer))
..add(DiagnosticsProperty('myPlayerInfo', myPlayerInfo))
..add(DiagnosticsProperty('mySymbol', mySymbol))
..add(DiagnosticsProperty('isJoiningRoom', isJoiningRoom));
}
@ -298,8 +298,8 @@ class _$OnlineGameStateImpl extends _OnlineGameState
(identical(other.roomInfo, roomInfo) ||
other.roomInfo == roomInfo) &&
(identical(other.error, error) || other.error == error) &&
(identical(other.currentPlayer, currentPlayer) ||
other.currentPlayer == currentPlayer) &&
(identical(other.myPlayerInfo, myPlayerInfo) ||
other.myPlayerInfo == myPlayerInfo) &&
(identical(other.mySymbol, mySymbol) ||
other.mySymbol == mySymbol) &&
(identical(other.isJoiningRoom, isJoiningRoom) ||
@ -313,7 +313,7 @@ class _$OnlineGameStateImpl extends _OnlineGameState
connectionStatus,
roomInfo,
error,
currentPlayer,
myPlayerInfo,
mySymbol,
isJoiningRoom,
);
@ -336,7 +336,7 @@ abstract class _OnlineGameState extends OnlineGameState {
final ConnectionStatus connectionStatus,
final RoomInfo? roomInfo,
final String? error,
final PlayerInfo? currentPlayer,
final PlayerInfo? myPlayerInfo,
final Player? mySymbol,
final bool isJoiningRoom,
}) = _$OnlineGameStateImpl;
@ -351,7 +351,7 @@ abstract class _OnlineGameState extends OnlineGameState {
@override
String? get error;
@override
PlayerInfo? get currentPlayer;
PlayerInfo? get myPlayerInfo;
@override
Player? get mySymbol;
@override

View File

@ -6,7 +6,7 @@ part of 'online_game.dart';
// RiverpodGenerator
// **************************************************************************
String _$onlineGameHash() => r'aadff5d033f9ba7204a28a9e2cd3bf2e28eb0eb0';
String _$onlineGameHash() => r'48e7fa3af0e8896b9b57218e97e001761c40581a';
/// 在线游戏的StateNotifier负责所有业务逻辑
///

View File

@ -167,14 +167,25 @@ class _OnlineGameScreenState extends ConsumerState<OnlineGameScreen> {
Widget _buildPlayersInfo(OnlineGameState state) {
final players = state.roomInfo?.players ?? [];
// 根据玩家符号(X/O)查找玩家,而不是依赖列表顺序
PlayerInfo? playerX;
PlayerInfo? playerO;
for (final p in players) {
if (p.playerSymbol == Player.x) {
playerX = p;
} else if (p.playerSymbol == Player.o) {
playerO = p;
}
}
return Row(
children: [
// 玩家1 (X)
Expanded(
child: _buildPlayerCard(
players.isNotEmpty ? players[0] : null,
playerX,
Player.x,
state.currentPlayer?.playerId,
state.myPlayerInfo?.playerId,
),
),
@ -184,7 +195,7 @@ class _OnlineGameScreenState extends ConsumerState<OnlineGameScreen> {
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: 0.2),
color: Colors.white.withOpacity(0.2),
borderRadius: BorderRadius.circular(8),
),
child: const Text(
@ -202,9 +213,9 @@ class _OnlineGameScreenState extends ConsumerState<OnlineGameScreen> {
// 玩家2 (O)
Expanded(
child: _buildPlayerCard(
players.length > 1 ? players[1] : null,
playerO,
Player.o,
state.currentPlayer?.playerId,
state.myPlayerInfo?.playerId,
),
),
],

View File

@ -68,7 +68,7 @@ class _OnlineLobbyScreenState extends ConsumerState<OnlineLobbyScreen>
// 检查是否已经在房间中,如果是则直接跳转到游戏屏幕
WidgetsBinding.instance.addPostFrameCallback((_) {
if (onlineState.roomInfo != null && onlineState.currentPlayer != null) {
if (onlineState.roomInfo != null && onlineState.myPlayerInfo != null) {
// 避免在build过程中导航
if (ModalRoute.of(context)?.isCurrent ?? false) {
Navigator.of(context).pushReplacement(
@ -83,7 +83,7 @@ class _OnlineLobbyScreenState extends ConsumerState<OnlineLobbyScreen>
// 房间创建或加入成功,进入游戏
if (previous?.roomInfo == null &&
next.roomInfo != null &&
next.currentPlayer != null) {
next.myPlayerInfo != null) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (context) => const OnlineGameScreen()),
);

View File

@ -57,10 +57,16 @@ class RoomManager {
return RoomJoinResult.error('您已经在房间中');
}
// 修复:动态决定玩家符号,而不是硬编码为 O
final existingSymbols = room.players.map((p) => p.playerSymbol).toSet();
final newPlayerSymbol = existingSymbols.contains(Player.x)
? Player.o
: Player.x;
final player = PlayerInfo(
playerId: playerId,
playerName: playerName,
playerSymbol: Player.o, // 加入者总是 O
playerSymbol: newPlayerSymbol,
joinedAt: DateTime.now().millisecondsSinceEpoch,
);

View File

@ -6,7 +6,7 @@ packages:
description:
name: _fe_analyzer_shared
sha256: c81659312e021e3b780a502206130ea106487b34793bce61e26dc0f9b84807af
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "83.0.0"
adaptive_number:
@ -14,7 +14,7 @@ packages:
description:
name: adaptive_number
sha256: "3a567544e9b5c9c803006f51140ad544aedc79604fd4f3f2c1380003f97c1d77"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
analyzer:
@ -22,7 +22,7 @@ packages:
description:
name: analyzer
sha256: "9c35a79bf2a150b3ea0d40010fbbb45b5ebea143d47096e0f82fd922a324b49b"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "7.4.6"
args:
@ -30,7 +30,7 @@ packages:
description:
name: args
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.7.0"
async:
@ -38,7 +38,7 @@ packages:
description:
name: async
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.13.0"
boolean_selector:
@ -46,7 +46,7 @@ packages:
description:
name: boolean_selector
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
build:
@ -54,7 +54,7 @@ packages:
description:
name: build
sha256: "51dc711996cbf609b90cbe5b335bbce83143875a9d58e4b5c6d3c4f684d3dda7"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.5.4"
build_config:
@ -62,7 +62,7 @@ packages:
description:
name: build_config
sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
build_daemon:
@ -70,7 +70,7 @@ packages:
description:
name: build_daemon
sha256: "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "4.0.4"
build_resolvers:
@ -78,7 +78,7 @@ packages:
description:
name: build_resolvers
sha256: ee4257b3f20c0c90e72ed2b57ad637f694ccba48839a821e87db762548c22a62
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.5.4"
build_runner:
@ -86,7 +86,7 @@ packages:
description:
name: build_runner
sha256: "382a4d649addbfb7ba71a3631df0ec6a45d5ab9b098638144faf27f02778eb53"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.5.4"
build_runner_core:
@ -94,7 +94,7 @@ packages:
description:
name: build_runner_core
sha256: "85fbbb1036d576d966332a3f5ce83f2ce66a40bea1a94ad2d5fc29a19a0d3792"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "9.1.2"
built_collection:
@ -102,7 +102,7 @@ packages:
description:
name: built_collection
sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "5.1.1"
built_value:
@ -110,7 +110,7 @@ packages:
description:
name: built_value
sha256: "082001b5c3dc495d4a42f1d5789990505df20d8547d42507c29050af6933ee27"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "8.10.1"
checked_yaml:
@ -118,7 +118,7 @@ packages:
description:
name: checked_yaml
sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.0.4"
clock:
@ -126,7 +126,7 @@ packages:
description:
name: clock
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
code_builder:
@ -134,7 +134,7 @@ packages:
description:
name: code_builder
sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "4.10.1"
collection:
@ -142,7 +142,7 @@ packages:
description:
name: collection
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.19.1"
convert:
@ -150,7 +150,7 @@ packages:
description:
name: convert
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
crypto:
@ -158,7 +158,7 @@ packages:
description:
name: crypto
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
dart_jsonwebtoken:
@ -166,7 +166,7 @@ packages:
description:
name: dart_jsonwebtoken
sha256: "00a0812d2aeaeb0d30bcbc4dd3cee57971dbc0ab2216adf4f0247f37793f15ef"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.17.0"
dart_style:
@ -174,7 +174,7 @@ packages:
description:
name: dart_style
sha256: "5b236382b47ee411741447c1f1e111459c941ea1b3f2b540dde54c210a3662af"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
ed25519_edwards:
@ -182,7 +182,7 @@ packages:
description:
name: ed25519_edwards
sha256: "6ce0112d131327ec6d42beede1e5dfd526069b18ad45dcf654f15074ad9276cd"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "0.3.1"
file:
@ -190,7 +190,7 @@ packages:
description:
name: file
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "7.0.1"
fixnum:
@ -198,7 +198,7 @@ packages:
description:
name: fixnum
sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
freezed:
@ -206,7 +206,7 @@ packages:
description:
name: freezed
sha256: "59a584c24b3acdc5250bb856d0d3e9c0b798ed14a4af1ddb7dc1c7b41df91c9c"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.5.8"
freezed_annotation:
@ -214,7 +214,7 @@ packages:
description:
name: freezed_annotation
sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.4.4"
frontend_server_client:
@ -222,7 +222,7 @@ packages:
description:
name: frontend_server_client
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
glob:
@ -230,7 +230,7 @@ packages:
description:
name: glob
sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
graphs:
@ -238,7 +238,7 @@ packages:
description:
name: graphs
sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
http:
@ -246,7 +246,7 @@ packages:
description:
name: http
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.4.0"
http_methods:
@ -254,7 +254,7 @@ packages:
description:
name: http_methods
sha256: "6bccce8f1ec7b5d701e7921dca35e202d425b57e317ba1a37f2638590e29e566"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
http_multi_server:
@ -262,7 +262,7 @@ packages:
description:
name: http_multi_server
sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "3.2.2"
http_parser:
@ -270,7 +270,7 @@ packages:
description:
name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "4.1.2"
io:
@ -278,7 +278,7 @@ packages:
description:
name: io
sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.0.5"
js:
@ -286,7 +286,7 @@ packages:
description:
name: js
sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "0.7.2"
json_annotation:
@ -294,7 +294,7 @@ packages:
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "4.9.0"
json_serializable:
@ -302,7 +302,7 @@ packages:
description:
name: json_serializable
sha256: c50ef5fc083d5b5e12eef489503ba3bf5ccc899e487d691584699b4bdefeea8c
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "6.9.5"
lints:
@ -310,7 +310,7 @@ packages:
description:
name: lints
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
logging:
@ -318,7 +318,7 @@ packages:
description:
name: logging
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
matcher:
@ -326,7 +326,7 @@ packages:
description:
name: matcher
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "0.12.17"
meta:
@ -334,7 +334,7 @@ packages:
description:
name: meta
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.17.0"
mime:
@ -342,7 +342,7 @@ packages:
description:
name: mime
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
package_config:
@ -350,7 +350,7 @@ packages:
description:
name: package_config
sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
path:
@ -358,7 +358,7 @@ packages:
description:
name: path
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
pointycastle:
@ -366,7 +366,7 @@ packages:
description:
name: pointycastle
sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "3.9.1"
pool:
@ -374,7 +374,7 @@ packages:
description:
name: pool
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.5.1"
pub_semver:
@ -382,7 +382,7 @@ packages:
description:
name: pub_semver
sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
pubspec_parse:
@ -390,7 +390,7 @@ packages:
description:
name: pubspec_parse
sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.5.0"
shelf:
@ -398,7 +398,7 @@ packages:
description:
name: shelf
sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.4.2"
shelf_cors_headers:
@ -406,7 +406,7 @@ packages:
description:
name: shelf_cors_headers
sha256: a127c80f99bbef3474293db67a7608e3a0f1f0fcdb171dad77fa9bd2cd123ae4
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "0.1.5"
shelf_router:
@ -414,7 +414,7 @@ packages:
description:
name: shelf_router
sha256: f5e5d492440a7fb165fe1e2e1a623f31f734d3370900070b2b1e0d0428d59864
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.1.4"
shelf_web_socket:
@ -422,7 +422,7 @@ packages:
description:
name: shelf_web_socket
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
source_gen:
@ -430,7 +430,7 @@ packages:
description:
name: source_gen
sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
source_helper:
@ -438,7 +438,7 @@ packages:
description:
name: source_helper
sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.3.5"
source_span:
@ -446,7 +446,7 @@ packages:
description:
name: source_span
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.10.1"
stack_trace:
@ -454,7 +454,7 @@ packages:
description:
name: stack_trace
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.12.1"
stream_channel:
@ -462,7 +462,7 @@ packages:
description:
name: stream_channel
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
stream_transform:
@ -470,7 +470,7 @@ packages:
description:
name: stream_transform
sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
string_scanner:
@ -478,7 +478,7 @@ packages:
description:
name: string_scanner
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.4.1"
term_glyph:
@ -486,7 +486,7 @@ packages:
description:
name: term_glyph
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.2.2"
test_api:
@ -494,7 +494,7 @@ packages:
description:
name: test_api
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "0.7.6"
timing:
@ -502,7 +502,7 @@ packages:
description:
name: timing
sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
typed_data:
@ -510,7 +510,7 @@ packages:
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.4.0"
watcher:
@ -518,7 +518,7 @@ packages:
description:
name: watcher
sha256: "0b7fd4a0bbc4b92641dbf20adfd7e3fd1398fe17102d94b674234563e110088a"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
web:
@ -526,7 +526,7 @@ packages:
description:
name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
web_socket_channel:
@ -534,7 +534,7 @@ packages:
description:
name: web_socket_channel
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
yaml:
@ -542,7 +542,7 @@ packages:
description:
name: yaml
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
url: "https://pub.flutter-io.cn"
url: "https://pub.dev"
source: hosted
version: "3.1.3"
sdks: