58 lines
1.4 KiB
Dart
Raw Normal View History

2021-07-25 16:07:53 +08:00
import 'package:flowy_infra_ui/widget/spacing.dart';
2021-07-13 13:14:49 +08:00
import 'package:flutter/material.dart';
2021-07-25 16:07:53 +08:00
class SignInFormContainer extends StatelessWidget {
final List<Widget> children;
const SignInFormContainer({
2021-07-13 13:14:49 +08:00
Key? key,
2021-07-25 16:07:53 +08:00
required this.children,
2021-07-13 13:14:49 +08:00
}) : super(key: key);
@override
Widget build(BuildContext context) {
2021-07-25 16:07:53 +08:00
final size = MediaQuery.of(context).size;
2021-07-13 13:14:49 +08:00
return SizedBox(
2021-07-25 16:07:53 +08:00
width: size.width * 0.3,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: children,
),
);
}
}
class SignInTitle extends StatelessWidget {
final String title;
final Size logoSize;
const SignInTitle({
Key? key,
required this.title,
required this.logoSize,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return SizedBox(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
fit: BoxFit.cover,
width: logoSize.width,
height: logoSize.height,
image: const AssetImage('assets/images/app_flowy_logo.jpg')),
const VSpace(30),
Text(
title,
style: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 20,
),
)
],
),
);
2021-07-13 13:14:49 +08:00
}
}