Skip to content

Commit

Permalink
Add input test screen (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
tokou authored Sep 16, 2024
1 parent 021b181 commit 928d390
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
33 changes: 33 additions & 0 deletions lib/input_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import 'package:flutter/material.dart';

class InputScreen extends StatefulWidget {
const InputScreen({super.key});

@override
State<InputScreen> createState() => _InputScreenState();
}

class _InputScreenState extends State<InputScreen> {
final TextEditingController _inputController = TextEditingController();

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Lorem Ipsum'),
),
body: Padding(
padding: const EdgeInsets.all(16),
child: SingleChildScrollView(
child: TextField(
controller: _inputController,
maxLines: null,
decoration: const InputDecoration(
labelText: 'Lorem Ipsum',
),
),
),
),
);
}
}
9 changes: 9 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:demo_app/defects_screen.dart';
import 'package:demo_app/form_screen.dart';
import 'package:demo_app/input_screen.dart';
import 'package:demo_app/issue_1619_repro.dart';
import 'package:demo_app/issue_1677_repro.dart';
import 'package:demo_app/nesting_screen.dart';
Expand Down Expand Up @@ -107,6 +108,14 @@ class _MyHomePageState extends State<MyHomePage> {
},
child: const Text('Form Test'),
),
ElevatedButton(
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(builder: (_) => const InputScreen()),
);
},
child: const Text('Input Test'),
),
ElevatedButton(
onPressed: () {
Navigator.of(context).push(
Expand Down

0 comments on commit 928d390

Please sign in to comment.