Created
April 15, 2019 01:14
-
-
Save ckdevrel/012fa114639727e8ccbf4f3efe4288e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'; | |
class TextTabBarSolidIndicator extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Column( | |
mainAxisAlignment: MainAxisAlignment.end, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
TabBar( | |
indicator: UnderlineTabIndicator( | |
borderSide: BorderSide(width: 45.0, color: Colors.white), | |
), | |
labelColor: Colors.blueAccent, | |
labelStyle: TextStyle(decorationColor: Colors.grey), | |
unselectedLabelColor: Colors.white, | |
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