Skip to content

Instantly share code, notes, and snippets.

@ckdevrel
Created April 15, 2019 01:10
Show Gist options
  • Save ckdevrel/40745aef287997f7e55c34f0de857f43 to your computer and use it in GitHub Desktop.
Save ckdevrel/40745aef287997f7e55c34f0de857f43 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
class TextTabBarLineIndicator extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
TabBar(
indicator: UnderlineTabIndicator(
borderSide: BorderSide(width: 2, color: Colors.white),
),
labelColor: Colors.white,
labelStyle: TextStyle(decorationColor: Colors.grey),
unselectedLabelColor: Colors.white54,
tabs: [
ConstrainedBox(
constraints: BoxConstraints.expand(height: 40),
child: Center(
child: Text(
'Login',
style: TextStyle(
fontFamily: 'Assistant',
fontSize: 16,
fontWeight: FontWeight.w600),
))),
ConstrainedBox(
constraints: BoxConstraints.expand(height: 40),
child: Center(
child: Text(
'Signup',
style: TextStyle(
fontFamily: 'Assistant',
fontSize: 16,
fontWeight: FontWeight.w600),
))),
],
)
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment