Merge pull request #455 from pangeachat/float-create-button

Make create space/chat button float
pull/1384/head
ggurdin 1 year ago committed by GitHub
commit 87b1b98f0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -4109,5 +4109,7 @@
"continueText": "Continue",
"deleteSubscriptionWarningTitle": "You have an active subscription",
"deleteSubscriptionWarningBody": "Deleting your account will not automatically cancel your subscription.",
"manageSubscription": "Manage Subscription"
"manageSubscription": "Manage Subscription",
"createSpace": "Create space",
"createChat": "Create chat"
}

@ -27,6 +27,15 @@ class NewGroupView extends StatelessWidget {
),
title: Text(L10n.of(context)!.createGroup),
),
// #Pangea
floatingActionButton: FloatingActionButton.extended(
onPressed: controller.loading ? null : controller.submitAction,
icon: controller.loading ? null : const Icon(Icons.chat_bubble_outline),
label: controller.loading
? const CircularProgressIndicator.adaptive()
: Text(L10n.of(context)!.createChat),
),
// Pangea#
body: MaxWidthBody(
child: Column(
mainAxisSize: MainAxisSize.min,
@ -134,33 +143,33 @@ class NewGroupView extends StatelessWidget {
// value: !controller.publicGroup,
// onChanged: null,
// ),
// Padding(
// padding: const EdgeInsets.all(16.0),
// child: SizedBox(
// width: double.infinity,
// child: ElevatedButton(
// style: ElevatedButton.styleFrom(
// foregroundColor: Theme.of(context).colorScheme.onPrimary,
// backgroundColor: Theme.of(context).colorScheme.primary,
// ),
// onPressed:
// controller.loading ? null : controller.submitAction,
// child: controller.loading
// ? const LinearProgressIndicator()
// : Row(
// children: [
// Expanded(
// child: Text(
// L10n.of(context)!.createGroupAndInviteUsers,
// ),
// ),
// Icon(Icons.adaptive.arrow_forward_outlined),
// ],
// ),
// ),
// ),
// ),
// Pangea#
Padding(
padding: const EdgeInsets.all(16.0),
child: SizedBox(
width: double.infinity,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
foregroundColor: Theme.of(context).colorScheme.onPrimary,
backgroundColor: Theme.of(context).colorScheme.primary,
),
onPressed:
controller.loading ? null : controller.submitAction,
child: controller.loading
? const LinearProgressIndicator()
: Row(
children: [
Expanded(
child: Text(
L10n.of(context)!.createGroupAndInviteUsers,
),
),
Icon(Icons.adaptive.arrow_forward_outlined),
],
),
),
),
),
AnimatedSize(
duration: FluffyThemes.animationDuration,
child: error == null

@ -32,6 +32,15 @@ class NewSpaceView extends StatelessWidget {
// Pangea#
title: Text(L10n.of(context)!.createNewSpace),
),
// #Pangea
floatingActionButton: FloatingActionButton.extended(
onPressed: controller.loading ? null : controller.submitAction,
icon: controller.loading ? null : const Icon(Icons.workspaces_outlined),
label: controller.loading
? const CircularProgressIndicator.adaptive()
: Text(L10n.of(context)!.createSpace),
),
// Pangea#
body: MaxWidthBody(
child: Column(
mainAxisSize: MainAxisSize.min,
@ -158,33 +167,33 @@ class NewSpaceView extends StatelessWidget {
// value: controller.publicGroup,
// onChanged: controller.setPublicGroup,
// ),
// Padding(
// padding: const EdgeInsets.all(16.0),
// child: SizedBox(
// width: double.infinity,
// child: ElevatedButton(
// style: ElevatedButton.styleFrom(
// foregroundColor: Theme.of(context).colorScheme.onPrimary,
// backgroundColor: Theme.of(context).colorScheme.primary,
// ),
// onPressed:
// controller.loading ? null : controller.submitAction,
// child: controller.loading
// ? const LinearProgressIndicator()
// : Row(
// children: [
// Expanded(
// child: Text(
// L10n.of(context)!.createNewSpace,
// ),
// ),
// Icon(Icons.adaptive.arrow_forward_outlined),
// ],
// ),
// ),
// ),
// ),
// Pangea#
Padding(
padding: const EdgeInsets.all(16.0),
child: SizedBox(
width: double.infinity,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
foregroundColor: Theme.of(context).colorScheme.onPrimary,
backgroundColor: Theme.of(context).colorScheme.primary,
),
onPressed:
controller.loading ? null : controller.submitAction,
child: controller.loading
? const LinearProgressIndicator()
: Row(
children: [
Expanded(
child: Text(
L10n.of(context)!.createNewSpace,
),
),
Icon(Icons.adaptive.arrow_forward_outlined),
],
),
),
),
),
],
),
),

Loading…
Cancel
Save