Skip to content

Commit 559c31d

Browse files
Joshua27Joshua Schmidt
andauthored
Center title in completion view, fix build by upgrading version of flutter_platform_widgets, and fix a test (#133)
* center title in completion view * update version of flutter_platform_widgets * fix test: the test sets up texts in lowercase but searches for uppercase texts afterwards; I'm not sure why this worked before --------- Co-authored-by: Joshua Schmidt <[email protected]>
1 parent 8867f8c commit 559c31d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

lib/src/views/completion_view.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ class CompletionView extends StatelessWidget {
2121
DateTime.now(),
2222
),
2323
title: Text(completionStep.title,
24-
style: Theme.of(context).textTheme.displayMedium),
24+
style: Theme.of(context).textTheme.displayMedium,
25+
textAlign: TextAlign.center),
2526
child: Padding(
2627
padding: const EdgeInsets.symmetric(horizontal: 64.0),
2728
child: Column(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies:
1818
flutter:
1919
sdk: flutter
2020
flutter_bloc: ^8.0.1
21-
flutter_platform_widgets: ^2.2.6
21+
flutter_platform_widgets: ^3.3.5
2222
go_router: ^6.0.1
2323
image_picker: ^0.8.5+3
2424
intl: ^0.18.0

test/surveykit_flutter_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ void main() {
4141
await tester.pumpWidget(surveyWidget);
4242
await tester.pumpAndSettle();
4343

44-
final introButton = find.text('Let\'s go!'.toUpperCase());
44+
final introButton = find.text('Let\'s go!');
4545
expect(introButton, findsOneWidget);
4646
await tester.tap(introButton);
4747

4848
await tester.pumpAndSettle();
4949
final textField = find.byType(TextField);
5050
await tester.enterText(textField, '20');
5151
await tester.pumpAndSettle();
52-
final questionButton = find.text('Next'.toUpperCase());
52+
final questionButton = find.text('Next');
5353
expect(questionButton, findsOneWidget);
5454
await tester.tap(questionButton);
5555

5656
await tester.pumpAndSettle();
57-
final completeButtom = find.text('Submit survey'.toUpperCase());
57+
final completeButtom = find.text('Submit survey');
5858
expect(completeButtom, findsOneWidget);
5959
await tester.tap(completeButtom);
6060
});

0 commit comments

Comments
 (0)