refactor: Switch to TextButton

This commit is contained in:
Christian Pauly 2021-02-27 07:53:34 +01:00
commit e0716f643c
13 changed files with 45 additions and 67 deletions

View file

@ -754,7 +754,7 @@ class _ChatState extends State<Chat> {
child: CircularProgressIndicator(),
)
: _canLoadMore
? FlatButton(
? TextButton(
child: Text(
L10n.of(context).loadMore,
style: TextStyle(
@ -1014,7 +1014,7 @@ class _ChatState extends State<Chat> {
? <Widget>[
Container(
height: 56,
child: FlatButton(
child: TextButton(
onPressed: () =>
forwardEventsAction(context),
child: Row(
@ -1033,7 +1033,7 @@ class _ChatState extends State<Chat> {
0
? Container(
height: 56,
child: FlatButton(
child: TextButton(
onPressed: () => replyAction(),
child: Row(
children: <Widget>[
@ -1047,7 +1047,7 @@ class _ChatState extends State<Chat> {
)
: Container(
height: 56,
child: FlatButton(
child: TextButton(
onPressed: () =>
sendAgainAction(timeline),
child: Row(

View file

@ -174,8 +174,12 @@ class _ChatListState extends State<ChatList> {
final GlobalKey<DefaultAppBarSearchFieldState> _searchFieldKey = GlobalKey();
Future<List<ThirdPartyIdentifier>> _thirdPartyIdentifierFuture;
@override
Widget build(BuildContext context) {
_thirdPartyIdentifierFuture ??=
Matrix.of(context).client.requestThirdPartyIdentifiers();
return StreamBuilder<Object>(
stream: Matrix.of(context).onShareContentChanged.stream,
builder: (_, __) {

View file

@ -202,7 +202,7 @@ class _HomeserverPickerState extends State<HomeserverPicker> {
Wrap(
alignment: WrapAlignment.center,
children: [
FlatButton(
TextButton(
child: Text(
L10n.of(context).privacy,
style: TextStyle(
@ -212,7 +212,7 @@ class _HomeserverPickerState extends State<HomeserverPicker> {
),
onPressed: () => launch(AppConfig.privacyUrl),
),
FlatButton(
TextButton(
child: Text(
L10n.of(context).about,
style: TextStyle(

View file

@ -246,7 +246,7 @@ class _LoginState extends State<Login> {
),
),
Center(
child: FlatButton(
child: TextButton(
child: Text(
L10n.of(context).passwordForgotten,
style: TextStyle(

View file

@ -90,7 +90,7 @@ class _NewPrivateChatState extends State<NewPrivateChat> {
title: Text(L10n.of(context).newChat),
elevation: 0,
actions: [
FlatButton(
TextButton(
child: Text(
L10n.of(context).createNewGroup,
style: TextStyle(color: Theme.of(context).accentColor),

View file

@ -158,7 +158,7 @@ class _SignUpState extends State<SignUp> {
),
),
Center(
child: FlatButton(
child: TextButton(
child: Text(
L10n.of(context).alreadyHaveAnAccount,
style: TextStyle(