create widget for stuff that sticks to bottom
This commit is contained in:
parent
6729a040ea
commit
b39d6b06d7
|
@ -142,17 +142,11 @@ class CreatePostPage extends HookWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
SafeArea(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Spacer(),
|
||||
EditorToolbar(
|
||||
editorFocusNode: editorFocusNode,
|
||||
controller: bodyController,
|
||||
instanceHost: context.read<CreatePostStore>().instanceHost,
|
||||
),
|
||||
],
|
||||
BottomSticky(
|
||||
child: EditorToolbar(
|
||||
editorFocusNode: editorFocusNode,
|
||||
controller: bodyController,
|
||||
instanceHost: context.read<CreatePostStore>().instanceHost,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -384,19 +384,13 @@ class _ManageAccount extends HookWidget {
|
|||
const BottomSafe(),
|
||||
],
|
||||
),
|
||||
SafeArea(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Spacer(),
|
||||
EditorToolbar(
|
||||
editorFocusNode: bioFocusNode,
|
||||
controller: bioController,
|
||||
instanceHost: user.instanceHost,
|
||||
),
|
||||
],
|
||||
BottomSticky(
|
||||
child: EditorToolbar(
|
||||
editorFocusNode: bioFocusNode,
|
||||
controller: bioController,
|
||||
instanceHost: user.instanceHost,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,23 @@ class EditorToolbar extends HookWidget {
|
|||
);
|
||||
}
|
||||
|
||||
static Widget safeArea = const SizedBox(height: _height);
|
||||
static const safeArea = SizedBox(height: _height);
|
||||
}
|
||||
|
||||
class BottomSticky extends StatelessWidget {
|
||||
final Widget child;
|
||||
const BottomSticky({required this.child});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => SafeArea(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Spacer(),
|
||||
child,
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class _ToolbarBody extends HookWidget {
|
||||
|
|
|
@ -137,17 +137,11 @@ class WriteComment extends HookWidget {
|
|||
EditorToolbar.safeArea,
|
||||
],
|
||||
),
|
||||
SafeArea(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Spacer(),
|
||||
EditorToolbar(
|
||||
editorFocusNode: editorFocusNode,
|
||||
controller: controller,
|
||||
instanceHost: post.instanceHost,
|
||||
),
|
||||
],
|
||||
BottomSticky(
|
||||
child: EditorToolbar(
|
||||
editorFocusNode: editorFocusNode,
|
||||
controller: controller,
|
||||
instanceHost: post.instanceHost,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue