Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/cupertino.dart';
- import 'package:flutter/material.dart';
- import '../../generated/l10n.dart';
- import '../../models/checkup_param.dart';
- import '../../utils/colors.dart';
- import '../../widgets/analytics/cards.dart';
- import '../../widgets/cupertino_fullscreen_dialog_template.dart';
- import '../../widgets/shared/toggle.dart';
- class CheckupParamScreen extends StatefulWidget {
- final CheckupParam param;
- const CheckupParamScreen({Key key, @required this.param}) : super(key: key);
- @override
- _CheckupParamScreenState createState() => _CheckupParamScreenState();
- }
- class _CheckupParamScreenState extends State<CheckupParamScreen> {
- int _selectedIndex = 0;
- @override
- Widget build(BuildContext context) {
- final headlineTextStyle = Theme.of(context).textTheme.headline3;
- return CupertinoFullscreenDialogTemplate(
- title: widget.param.title,
- titleWidth: 300,
- content: [
- Text(S.of(context).checkupParamScreenTitle, style: headlineTextStyle),
- const SizedBox(height: 16),
- Toggle(
- tabs: [
- Text(S.of(context).checkupParamSelectorCurrentLabel),
- Text(S.of(context).checkupParamSelectorComparisonLabel),
- ],
- onChanged: (index) => setState(() => _selectedIndex = index),
- ),
- const SizedBox(
- height: 16,
- ),
- Text(S.of(context).checkupParamScreenDescriptionTitle, style: headlineTextStyle),
- const SizedBox(
- height: 24,
- ),
- AnimatedSwitcher(
- duration: Duration(milliseconds: 300),
- child: _selectedIndex == 0
- ? Padding(
- padding: const EdgeInsets.only(bottom: 32),
- child: ParamCard(checkupParam: widget.param, showTitle: false,),
- )
- : Padding(
- padding: const EdgeInsets.only(bottom: 24),
- child: Placeholder(
- color: lightBlue,
- fallbackHeight: 215,
- ),
- ),
- ),
- Text('We take the unique data based on your multi-parameter blood test and create a bespoke supplementation formula delivering a complete range of key micronutrients to your body. Watch your progress in real-time using the proprietary bioniq health monitoring platform.'
- 'We take the unique data based on your multi-parameter blood test and create a bespoke supplementation formula delivering a complete',
- style: Theme.of(context).textTheme.subtitle1),
- ],
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement