62 lines
1.7 KiB
Dart
62 lines
1.7 KiB
Dart
import 'package:didvan/pages/authentication/widgets/authentication_app_bar.dart';
|
|
import 'package:didvan/widgets/logos/didvan_horizontal_logo.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class AuthenticationLayout extends StatelessWidget {
|
|
final List<Widget> children;
|
|
final String? appBarTitle;
|
|
|
|
const AuthenticationLayout(
|
|
{Key? key, required this.children, this.appBarTitle})
|
|
: super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return CustomScrollView(
|
|
slivers: [
|
|
if (appBarTitle != null)
|
|
SliverAppBar(
|
|
automaticallyImplyLeading: false,
|
|
pinned: true,
|
|
toolbarHeight: 56,
|
|
backgroundColor: Theme.of(context).colorScheme.background,
|
|
flexibleSpace: Padding(
|
|
padding: EdgeInsets.only(
|
|
left: 16,
|
|
right: 16,
|
|
top: MediaQuery.of(context).padding.top,
|
|
),
|
|
child: AuthenticationAppBar(
|
|
title: appBarTitle,
|
|
),
|
|
),
|
|
),
|
|
SliverPadding(
|
|
padding: EdgeInsets.only(
|
|
top: appBarTitle == null ? 100 : 44,
|
|
left: 100,
|
|
right: 100,
|
|
bottom: 40,
|
|
),
|
|
sliver: const SliverToBoxAdapter(
|
|
child: DidvanVerticalLogo(
|
|
height: 200,
|
|
),
|
|
),
|
|
),
|
|
SliverPadding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
sliver: SliverFillRemaining(
|
|
hasScrollBody: false,
|
|
child: Column(
|
|
children: [
|
|
for (var i = 0; i < children.length; i++) children[i],
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|