Skip to content

Instantly share code, notes, and snippets.

@Lootwig
Created August 9, 2023 13:02
Show Gist options
  • Save Lootwig/6228562fc9aaf5b0bb560ad00013a6c1 to your computer and use it in GitHub Desktop.
Save Lootwig/6228562fc9aaf5b0bb560ad00013a6c1 to your computer and use it in GitHub Desktop.
solar-midnight-7981
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