58 lines
1.4 KiB
Dart
Raw Normal View History

import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme.dart';
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';
import 'package:provider/provider.dart';
2021-07-13 13:14:49 +08:00
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) {
final theme = context.watch<AppTheme>();
2021-07-25 16:07:53 +08:00
return SizedBox(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
svgWidgetWithName("small_logo.svg"),
2021-07-25 16:07:53 +08:00
const VSpace(30),
Text(
title,
style: TextStyle(
color: theme.shader1,
fontWeight: FontWeight.w600,
fontSize: 24,
2021-07-25 16:07:53 +08:00
),
)
],
),
);
2021-07-13 13:14:49 +08:00
}
}