|
|
|
@ -22,26 +22,14 @@ class NewSpaceView extends StatelessWidget {
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ListTile(
|
|
|
|
|
trailing: const Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.0),
|
|
|
|
|
child: Icon(Icons.info_outlined),
|
|
|
|
|
),
|
|
|
|
|
subtitle: Text(L10n.of(context)!.newSpaceDescription),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
borderRadius: BorderRadius.circular(90),
|
|
|
|
|
onTap: controller.loading ? null : controller.selectPhoto,
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
radius: Avatar.defaultSize / 2,
|
|
|
|
|
radius: Avatar.defaultSize,
|
|
|
|
|
child: avatar == null
|
|
|
|
|
? const Icon(Icons.camera_alt_outlined)
|
|
|
|
|
? const Icon(Icons.add_a_photo_outlined)
|
|
|
|
|
: ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(90),
|
|
|
|
|
child: Image.memory(
|
|
|
|
@ -53,9 +41,11 @@ class NewSpaceView extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 16),
|
|
|
|
|
Expanded(
|
|
|
|
|
const SizedBox(height: 32),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
|
|
|
|
child: TextField(
|
|
|
|
|
autofocus: true,
|
|
|
|
|
controller: controller.nameController,
|
|
|
|
|
autocorrect: false,
|
|
|
|
|
readOnly: controller.loading,
|
|
|
|
@ -66,30 +56,19 @@ class NewSpaceView extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
|
|
|
|
child: TextField(
|
|
|
|
|
controller: controller.topicController,
|
|
|
|
|
minLines: 4,
|
|
|
|
|
maxLines: 4,
|
|
|
|
|
maxLength: 255,
|
|
|
|
|
readOnly: controller.loading,
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
hintText: L10n.of(context)!.addChatDescription,
|
|
|
|
|
errorText: controller.topicError,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
|
SwitchListTile.adaptive(
|
|
|
|
|
title: Text(L10n.of(context)!.spaceIsPublic),
|
|
|
|
|
value: controller.publicGroup,
|
|
|
|
|
onChanged: controller.setPublicGroup,
|
|
|
|
|
),
|
|
|
|
|
ListTile(
|
|
|
|
|
trailing: const Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.0),
|
|
|
|
|
child: Icon(Icons.info_outlined),
|
|
|
|
|
),
|
|
|
|
|
subtitle: Text(L10n.of(context)!.newSpaceDescription),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(16.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|