Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
feat: show name on _UserNameInput
Ian Su29ce17178375
diff --git a/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_user_view.dart b/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_user_view.dartindex b72df8f272..f347dbed7b 100644--- a/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_user_view.dart+++ b/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_user_view.dart@@ -16,28 +16,36 @@ class SettingsUserView extends StatelessWidget {builder: (context, state) => SingleChildScrollView(child: Column(crossAxisAlignment: CrossAxisAlignment.start,- children: const [_UserNameInput()],+ children: [_renderUserNameInput(context)],),),),);}++ Widget _renderUserNameInput(BuildContext context) {+ String name = context.read<SettingsUserViewBloc>().state.userProfile.name;+ debugPrint(name);+ return _UserNameInput(name);+ }}class _UserNameInput extends StatelessWidget {- const _UserNameInput({+ final String name;+ const _UserNameInput(+ this.name, {Key? key,}) : super(key: key);@overrideWidget build(BuildContext context) {return TextField(+ controller: TextEditingController()..text = name,decoration: const InputDecoration(labelText: 'Name',),onSubmitted: (val) {context.read<SettingsUserViewBloc>().add(SettingsUserEvent.updateUserName(val));- debugPrint("Value $val submitted");});}}