// Copyright 2014 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'use_cases.dart'; class TextButtonUseCase extends UseCase { @override String get name => 'TextButton'; @override String get route => '/text-button'; @override Widget build(BuildContext context) => const MainWidget(); } class MainWidget extends StatefulWidget { const MainWidget({super.key}); @override State createState() => MainWidgetState(); } class MainWidgetState extends State { double currentSliderValue = 20; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: const Text('TextButton'), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Row( mainAxisAlignment: MainAxisAlignment.center, children: [ const Text('This is a TextButton:'), TextButton( onPressed: () { }, child: const Text('Action'), ), ], ), const Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Text('This is a disabled TextButton:'), TextButton( onPressed: null, child: Text('Action'), ), ], ), ], ), ), ); } }