diff --git a/lib/pages/admin_group_edit/admin_group_edit_controller.dart b/lib/pages/admin_group_edit/admin_group_edit_controller.dart index e37b121..a6405db 100644 --- a/lib/pages/admin_group_edit/admin_group_edit_controller.dart +++ b/lib/pages/admin_group_edit/admin_group_edit_controller.dart @@ -14,11 +14,12 @@ class AdminGroupEditController extends StateNotifier with L } GroupRepository get groupRepository => read(); + HackathonRepository get hackathonRepository => read(); Future handlePostGroups() async { state = state.copyWith(notifierState: NotifierState.loading); - await groupRepository.createGroups(hackathonRepository.currentHackathonId, state.groups); + await groupRepository.createGroups(await hackathonRepository.currentHackathonId(), state.groups); state = state.copyWith(notifierState: NotifierState.loaded); } } diff --git a/lib/pages/profile_detail/widgets/profile_container.dart b/lib/pages/profile_detail/widgets/profile_container.dart index 8829c30..201a77c 100644 --- a/lib/pages/profile_detail/widgets/profile_container.dart +++ b/lib/pages/profile_detail/widgets/profile_container.dart @@ -8,8 +8,7 @@ import 'package:morning_weakers/models/models.dart'; class ProfileContainer extends StatelessWidget { @override Widget build(BuildContext context) { - if (context.select((state) => state.user) == - null) { + if (context.select((state) => state.user) == null) { return const Center(child: CircularProgressIndicator()); } else { return Container( @@ -20,11 +19,11 @@ class ProfileContainer extends StatelessWidget { Row( children: [ Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, color: Colors.blue), - child: const CircleAvatar( - backgroundColor: Colors.blue, + decoration: const BoxDecoration(shape: BoxShape.circle, color: Colors.blue), + child: CircleAvatar( radius: 35, + backgroundImage: NetworkImage('${context.select((state) => state.user.iconUrl)}'), + backgroundColor: Colors.transparent, ), ), const SizedBox(width: 20), @@ -37,20 +36,17 @@ class ProfileContainer extends StatelessWidget { const SizedBox(height: 20), ProfileListContainer( titleName: 'ハンドルネーム', - contentName: - '${context.select((state) => state.user.displayName)}', + contentName: '${context.select((state) => state.user.displayName)}', ), const Divider(), ProfileListContainer( titleName: 'Twitter', - contentName: - '${context.select((state) => state.user.twitterAccount)}', + contentName: '${context.select((state) => state.user.twitterAccount)}', ), const Divider(), ProfileListContainer( titleName: 'Github', - contentName: - '${context.select((state) => state.user.githubAccount)}', + contentName: '${context.select((state) => state.user.githubAccount)}', ), const Divider(), TechnicalStackContainer(),