SHARE
TWEET

Untitled

a guest Jun 20th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TabController _tabController;
  2.  
  3.    @override
  4.     void initState() {
  5.       _tabController = TabController(length: 2, vsync: this);
  6.       _tabController.addListener(
  7.         () {
  8.           setState(() {});
  9.         },
  10.       );
  11.       super.initState();
  12.     }
  13.  
  14.  
  15.  
  16.     @override
  17.     Widget build(BuildContext context) {
  18.       return DefaultTabController(
  19.                length: 2,
  20.                ....
  21.      
  22. return TabBarView(
  23.                 controller: _tabController,
  24.                 physics: _tabController.index == 0
  25.                     ? NeverScrollableScrollPhysics()
  26.                     : AlwaysScrollableScrollPhysics(),
  27.                 children: <Widget>[
  28.                   GoogleMap(  
  29.                      ...),
  30.  
  31.                      AnotherWidgetHere()
  32.                      ]
  33.                      ....
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top