Skip to content

Commit

Permalink
Hotfix scrollable intro text
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolONEOfficial committed Mar 20, 2019
1 parent cd155de commit 52c9095
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 34 deletions.
18 changes: 10 additions & 8 deletions lib/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,19 @@ class About extends StatelessWidget {
),
];

Column _buildLogoTextColumn(
Widget _buildLogoTextColumn(
BuildContext ctx,
TextTheme textTheme,
) =>
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
mainAxisSize: MainAxisSize.max,
children: Intro.buildWelcomeTextList(
AppLocalizations.of(ctx),
Theme.of(ctx),
autoSize: false,
SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
mainAxisSize: MainAxisSize.max,
children: Intro.buildWelcomeTextList(
AppLocalizations.of(ctx),
Theme.of(ctx),
autoSize: false,
),
),
);

Expand Down
56 changes: 31 additions & 25 deletions lib/intro.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:intro_views_flutter/Models/page_view_model.dart';
Expand Down Expand Up @@ -51,42 +52,47 @@ class Intro extends StatelessWidget {
static List<Widget> buildWelcomeTextList(
AppLocalizations localizations,
ThemeData theme, {
bool showInitialSetup = false,
bool autoSize = true,
}) =>
(showInitialSetup
? <Widget>[AutoSizeText(localizations.introWelcomeInitialSetup)]
: [])
..addAll(<Widget>[
AutoSizeText(
localizations.introWelcomeDescription,
minFontSize: autoSize ? 12 : 25,
<Widget>[
AutoSizeText(
localizations.introWelcomeDescription,
minFontSize: autoSize ? 12 : 25,
textAlign: TextAlign.center,
),
InkWell(
child: AutoSizeText(
localizations.introWelcomeSupportBy,
style: theme.textTheme.caption,
maxFontSize: 20,
minFontSize: autoSize ? 12 : 20,
textAlign: TextAlign.center,
),
InkWell(
child: AutoSizeText(
localizations.introWelcomeSupportBy,
style: theme.textTheme.caption,
maxFontSize: 20,
minFontSize: autoSize ? 12 : 20,
textAlign: TextAlign.center,
),
onTap: () => About.openUrl('https://vk.com/profcomniu_online'),
),
]);
onTap: () => About.openUrl('https://vk.com/profcomniu_online'),
),
];

PageViewModel _buildWelcome() => PageViewModel(
pageColor: Colors.black,
bubble: Icon(
Icons.school,
color: Colors.black,
),
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: buildWelcomeTextList(
localizations,
theme,
showInitialSetup: true,
body: SingleChildScrollView(
child: AutoSizeText.rich(
TextSpan(
text: localizations.introWelcomeDescription + '\n',
children: <TextSpan>[
TextSpan(
text: localizations.introWelcomeSupportBy,
style: theme.textTheme.caption,
recognizer: TapGestureRecognizer()
..onTap =
() => About.openUrl('https://vk.com/profcomniu_online'),
),
],
),
textAlign: TextAlign.center,
),
),
title: _buildTitleText(localizations.introWelcomeTitle),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ranepa_timetable
description: Custom RANEPA android client on Flutter.

version: 1.5+9
version: 1.5.1+10

environment:
sdk: ">=2.1.0 <3.0.0"
Expand Down

0 comments on commit 52c9095

Please sign in to comment.