Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ckdevrel/bf378a4d886cba6823adca7549c0a843 to your computer and use it in GitHub Desktop.
Save ckdevrel/bf378a4d886cba6823adca7549c0a843 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
class TextIconTabBarLineIndicatorHorizontal 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: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Icon(Icons.person_outline),
SizedBox(width: 10),
Text('Login')
],
))),
ConstrainedBox(
constraints: BoxConstraints.expand(height: 40),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Icon(Icons.people_outline),
SizedBox(width: 10),
Text('Signup')
],
)),
],
)
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment