💥 Switch all id to uuid

This commit is contained in:
2025-05-14 20:03:57 +08:00
parent 661d07716b
commit 2759c009ad
33 changed files with 360 additions and 282 deletions

View File

@ -14,7 +14,7 @@ import 'package:styled_widget/styled_widget.dart';
part 'detail.g.dart';
@riverpod
Future<SnPost?> post(Ref ref, int id) async {
Future<SnPost?> post(Ref ref, String id) async {
final client = ref.watch(apiClientProvider);
final resp = await client.get('/posts/$id');
return SnPost.fromJson(resp.data);
@ -22,7 +22,7 @@ Future<SnPost?> post(Ref ref, int id) async {
@RoutePage()
class PostDetailScreen extends HookConsumerWidget {
final int id;
final String id;
const PostDetailScreen({super.key, @PathParam('id') required this.id});
@override