mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
63 lines
1.5 KiB
Dart
63 lines
1.5 KiB
Dart
import 'dart:math';
|
|
|
|
import 'package:flowy_infra/image.dart';
|
|
import 'package:flowy_infra/theme.dart';
|
|
import 'package:flowy_infra_ui/widget/spacing.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
class AuthFormContainer extends StatelessWidget {
|
|
final List<Widget> children;
|
|
const AuthFormContainer({
|
|
Key? key,
|
|
required this.children,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final size = MediaQuery.of(context).size;
|
|
return SizedBox(
|
|
width: min(size.width, 340),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: children,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class AuthFormTitle extends StatelessWidget {
|
|
final String title;
|
|
final Size logoSize;
|
|
const AuthFormTitle({
|
|
Key? key,
|
|
required this.title,
|
|
required this.logoSize,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final theme = context.watch<AppTheme>();
|
|
return SizedBox(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
SizedBox.fromSize(
|
|
size: const Size.square(40),
|
|
child: svgWidgetWithName("flowy_logo.svg"),
|
|
),
|
|
const VSpace(30),
|
|
Text(
|
|
title,
|
|
style: TextStyle(
|
|
color: theme.shader1,
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: 24,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|