Segemented Control with TabView for Flutter. Inspired by SegmentedControl (iOS) and Material Design.
How to use
Add flat_segmented_control to your package's pubspec.yaml, then intall it.
- Add this to your child Widget.
FlatSegmentedControl( tabChildren: <Widget>[ Container( height: 50.0, child: Center(child: Text("Tab 1")), ), Container( height: 50.0, child: Center(child: Text("Tab 2")), ), Container( height: 50.0, child: Center(child: Text("Tab 3")), ), ], childrenHeight: 150.0, children: <Widget>[ Center(child: Text("View 1")), Center(child: Text("View 2")), Center(child: Text("View 3")), ], ),
- Make sure length of children same as navChildren.
- Change childrenHeight or childrenWidth if you desire.
- Foreign Function Interface for interoperability with the C programming language. [...]
- HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
- Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.