mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-24 23:47:56 +00:00
profile page
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/auth/bloc/auth_cubit.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/profile_bloc/profile_bloc.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/profile_bloc/profile_event.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/profile_bloc/profile_state.dart';
|
||||
@@ -73,23 +74,26 @@ class ProfileView extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
IntrinsicWidth(
|
||||
child: TextFormField(
|
||||
maxLength: 30,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
focusNode: profileBloc.focusNode,
|
||||
controller: profileBloc.nameController,
|
||||
enabled: profileBloc.editName,
|
||||
onEditingComplete: () {
|
||||
profileBloc.add(SaveNameEvent(context: context));
|
||||
},
|
||||
decoration: const InputDecoration(
|
||||
hintText: "Your Name",
|
||||
border: InputBorder.none,
|
||||
fillColor: Colors.white10,
|
||||
counterText: '', // Hides the character count
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 200),
|
||||
child: TextFormField(
|
||||
maxLength: 30,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
focusNode: profileBloc.focusNode,
|
||||
controller: profileBloc.nameController,
|
||||
enabled: profileBloc.editName,
|
||||
onEditingComplete: () {
|
||||
profileBloc.add(SaveNameEvent(context: context));
|
||||
},
|
||||
decoration: const InputDecoration(
|
||||
hintText: "Your Name",
|
||||
border: InputBorder.none,
|
||||
fillColor: Colors.white10,
|
||||
counterText: '',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user