fork download
  1. @override
  2. Widget build(BuildContext context) {
  3. return MaterialApp (
  4. home: DefaultTabController(
  5. length: 3,
  6. child: NestedScrollView(
  7. controller: _nestedScrollViewController(),
  8. headerSliverBuilder: (BuildContext context, bool isScrolled) {
  9. return <Widget>[
  10. SliverAppBar(
  11. title: appBarTitle,
  12. actions: <Widget>[
  13. Builder(
  14. builder: (context) =>
  15. IconButton(
  16. icon: searchIcon,
  17. onPressed: () {
  18. search(context);
  19. },
  20. ),
  21. )
  22. ],
  23. pinned: true,
  24. floating: true,
  25. forceElevated: isScrolled,
  26. bottom: TabBar(
  27. tabs: <Widget>[
  28. Tab(text: 'TO DAY'),
  29. Tab(text: 'TOMORROW'),
  30. Tab(text: '7Days')
  31. ],
  32. controller: _tabBarController(),
  33. ),
  34. )
  35. ];
  36. },
  37. body: TabBarView(children: <Widget>[
  38. Text('text1'),
  39. Text('text2'),
  40. Text('text3'),
  41. ],),
  42. ),
  43. ),
  44. );
  45. }
Runtime error #stdin #stdout #stderr 0.08s 66880KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Unhandled exception:
NoSuchMethodError: No top-level getter 'main' declared.
Receiver: top-level
Tried calling: main
#0      NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:180)
#1      _getMainClosure (dart:_builtin:26)