pageview_navigation_panel

所属分类:WEB开发
开发工具:Dart
文件大小:0KB
下载次数:0
上传日期:2020-08-06 16:46:28
上 传 者sh-1993
说明:  Flutter PageView的导航面板和指示器,
(Naviagtion panel and indicator for Flutter PageView,)

文件列表:
.metadata (309, 2020-08-06)
CHANGELOG.md (65, 2020-08-06)
LICENSE (1069, 2020-08-06)
demo/ (0, 2020-08-06)
demo/demo.gif (320950, 2020-08-06)
example/ (0, 2020-08-06)
example/.metadata (305, 2020-08-06)
example/android/ (0, 2020-08-06)
example/android/app/ (0, 2020-08-06)
example/android/app/build.gradle (1762, 2020-08-06)
example/android/app/src/ (0, 2020-08-06)
example/android/app/src/debug/ (0, 2020-08-06)
example/android/app/src/debug/AndroidManifest.xml (323, 2020-08-06)
example/android/app/src/main/ (0, 2020-08-06)
example/android/app/src/main/AndroidManifest.xml (2568, 2020-08-06)
example/android/app/src/main/kotlin/ (0, 2020-08-06)
example/android/app/src/main/kotlin/example/ (0, 2020-08-06)
example/android/app/src/main/kotlin/example/example/ (0, 2020-08-06)
example/android/app/src/main/kotlin/example/example/MainActivity.kt (120, 2020-08-06)
example/android/app/src/main/res/ (0, 2020-08-06)
example/android/app/src/main/res/drawable/ (0, 2020-08-06)
example/android/app/src/main/res/drawable/launch_background.xml (434, 2020-08-06)
example/android/app/src/main/res/mipmap-hdpi/ (0, 2020-08-06)
example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (544, 2020-08-06)
example/android/app/src/main/res/mipmap-mdpi/ (0, 2020-08-06)
example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (442, 2020-08-06)
example/android/app/src/main/res/mipmap-xhdpi/ (0, 2020-08-06)
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (721, 2020-08-06)
example/android/app/src/main/res/mipmap-xxhdpi/ (0, 2020-08-06)
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (1031, 2020-08-06)
example/android/app/src/main/res/mipmap-xxxhdpi/ (0, 2020-08-06)
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (1443, 2020-08-06)
example/android/app/src/main/res/values/ (0, 2020-08-06)
example/android/app/src/main/res/values/styles.xml (951, 2020-08-06)
example/android/app/src/profile/ (0, 2020-08-06)
... ...

# pageview_navigation_panel Widget for displaying the current page of a PageView and navigating said PageView using buttons. ## Example ![](https://github.com/f3l1x98/pageview_navigation_panel/blob/master/demo/demo.gif) ```dart import 'package:flutter/material.dart'; import 'package:pageview_navigation_panel/pageview_navigation_panel.dart'; class HomePage extends StatefulWidget { @override State createState() => new _HomePageState(); } class HomePage extends StatefulWidget { @override State createState() => new _HomePageState(); } class _HomePageState extends State { final PageController _pageController = new PageController(initialPage: 0); final _currentPageNotifier = ValueNotifier(0.0); @override void initState() { super.initState(); _pageController.addListener(() { _currentPageNotifier.value = _pageController.page; }); } Widget _buildNavigationItem(String text, IconData icon) { return Column( children: [ Icon(icon), Text('$text', style: Theme.of(context).textTheme.button.copyWith(fontSize: 16, fontWeight: FontWeight.bold),), ], ); } Widget _buildViewWidget(String text) { return Center( child: Text('$text'), ); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Example'), ), backgroundColor: Theme.of(context).backgroundColor, body: SafeArea( child: SizedBox( height: MediaQuery.of(context).size.height - 50, child: Column( children: [ Container( height: MediaQuery.of(context).size.height - 180, child: PageView( controller: _pageController, children: [ _buildViewWidget("View Widget 1"), _buildViewWidget("View Widget 2"), _buildViewWidget("View Widget 3"), _buildViewWidget("View Widget 4"), ], ), ), NavigationPanel( currentPageNotifier: _currentPageNotifier, pageController: _pageController, panelHeight: 100, buttonWidth: 80.0, buttonHeight: 60.0, indicatorColor: Theme.of(context).selectedRowColor, buttonChildren: [ _buildNavigationItem('View1', Icons.looks_one), _buildNavigationItem('View2', Icons.looks_two), _buildNavigationItem('View3', Icons.looks_3), _buildNavigationItem('View4', Icons.looks_4), ], ), ], ), ), ), ); } } ```

近期下载者

相关文件


收藏者