flutter_page_view_nested_utils 0.0.3 flutter_page_view_nested_utils: ^0.0.3 copied to clipboard
Help pageview to scroll nested in another pageview
import 'package:flutter/material.dart';
import 'pv_in_pv.dart';
import 'tbv_in_tbv.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(""),
),
body: ListView(
children: [
TextButton(
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return const TabBarViewPage();
}));
},
child: Text("TabBarView in TabBarView"),
),
TextButton(
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return const PageViewPage();
}));
},
child: Text("PageView in PageView"),
),
],
),
);
}
}