Skip to content

Commit

Permalink
Add scrollController
Browse files Browse the repository at this point in the history
  • Loading branch information
ksw2000 committed Dec 21, 2021
1 parent a1a997c commit 3bfcd05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/pages/poster.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ class PosterPage extends StatefulWidget {

class _PosterPageState extends State<PosterPage> {
double width = 500;
final ScrollController scrollController = ScrollController();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('海報張貼系統')),
drawer: const MyDrawer(),
body: Scrollbar(
controller: scrollController,
isAlwaysShown: true,
child: SingleChildScrollView(
controller: scrollController,
child: Center(
child: Padding(
padding: const EdgeInsets.all(10),
Expand All @@ -30,7 +33,7 @@ class _PosterPageState extends State<PosterPage> {
children: [
Text(
'申請系統(測試中)',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headline6,
),
const SizedBox(height: 15),
const TextField(
Expand Down

0 comments on commit 3bfcd05

Please sign in to comment.