Created with <3 with dartpad.dev.
Created
August 9, 2023 13:02
-
-
Save Lootwig/6228562fc9aaf5b0bb560ad00013a6c1 to your computer and use it in GitHub Desktop.
solar-midnight-7981
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData.dark().copyWith( | |
scaffoldBackgroundColor: darkBlue, | |
tabBarTheme: TabBarTheme( | |
indicatorColor: Colors.red, | |
) | |
), | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Center( | |
child: MyWidget(), | |
), | |
), | |
); | |
} | |
} | |
class MyWidget extends StatefulWidget { | |
@override | |
State<MyWidget> createState() => _MyWidgetState(); | |
} | |
class _MyWidgetState extends State<MyWidget> with SingleTickerProviderStateMixin { | |
@override | |
Widget build(BuildContext context) { | |
return TabBar( | |
//indicatorColor: Colors.green, | |
controller: TabController(length: 2, vsync: this), | |
tabs: [ | |
Text('first'), | |
Text('second') | |
] | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment