title: Change button name when the button is clicked
body: <pre><code>import 'package:flutter/cupertino.dart';
  import 'package:flutter/material.dart';
  import 'package:flutter_form_builder/flutter_form_builder.dart';
  import 'package:paylater/res/asset_strings.dart';
  import 'package:paylater/res/motito_colors.dart';
  import 'package:paylater/res/string_en.dart';
  import 'package:paylater/res/style.dart';
  import 'package:paylater/screens/motito_stepper.dart';
  import 'package:paylater/screens/reset_password_verify.dart';
  import 'package:paylater/util/validator.dart';
  import 'package:paylater/widget/motito_dialog.dart';
  import 'package:paylater/widget/motito_flat_button.dart';
  
  
  class Resetsteps extends StatefulWidget {
  @override
  _ResetstepsState createState() =&gt; _ResetstepsState();
   }
  
   class _ResetstepsState extends State&lt;Resetsteps&gt; {
   final _formKey = GlobalKey&lt;FormBuilderState&gt;();
   final _phoneController = TextEditingController();
  
  
   bool phoneFieldEmpty = true;
  
   @override
   Widget build(BuildContext context) {
    MotitoDialog md = MotitoDialog(
    context,
    isDismissible: false,
  );
  md.style(
    borderRadius: 8.0,
    messageTextStyle: CustomTextStyles.kBody.copyWith(
      color: MotitoColors.kNeutralsGrey4,
      fontSize: 14.0,
    ),
  );
  return MotitoStepper(
    step: 1,
    total: 3,
    leading: GestureDetector(onTap: () {}, child: Icon(CupertinoIcons.arrow_left),), 
    helpMessage: 'I need help on the forgot my password page',
    body: SingleChildScrollView(
      child: FormBuilder(
        key: _formKey,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            SizedBox(height: 50.0),
            Text(
              'Forgot my Password',
              style: CustomTextStyles.kHeader3.copyWith(
                color: MotitoColors.kSecondaryTextColor1,
              ),
            ),
            SizedBox(height: 2.0),
            Text(
              'Please type in your phone number and we will send you a 6 digit code',
              style: CustomTextStyles.kBody.copyWith(
                color: MotitoColors.kNeutralsGrey5,
                fontSize: 14.0,
              ),
            ),
            SizedBox(height: 32.0),
                    textFieldLabel(
                      StringEn.kPhoneNumber,
                      required: true,
                    ),
                    TextFormField(
                      textInputAction: TextInputAction.next,
                      inputFormatters: [
                        FilteringTextInputFormatter.digitsOnly,
                      ],
                      controller: _phoneController,
                      keyboardType: TextInputType.phone,
                      decoration: inputDecoration(
                        context,
                        hint: StringEn.kPhoneHint,
                        prefixText: '(+233)',
                      ),
                      onChanged: (phone) {
                        if (phone != null &amp;&amp; phone.isNotEmpty) {
                          setState(() {
                            phoneFieldEmpty = false;
                          });
                        } else {
                          setState(() {
                            phoneFieldEmpty = true;
                          });
                        }
                      },
                      validator: FormBuilderValidators.compose([
                        FormBuilderValidators.minLength(context, 9,
                            errorText: AssetStrings.kInvalidPhone),
                        FormBuilderValidators.maxLength(context, 10,
                            errorText: AssetStrings.kInvalidPhone),
                        Validator.leadingZeroValidator,
                      ]),
                    ),
            SizedBox(height: 8.0),
            SizedBox(height: 120.0),
  </code></pre>
  <p>I am a junior intern and was assigned a task to add a new feature on an existing app. I am all done with the UI but cant get a particular function on my code to work here is the code for the button and I want the text to change on the button to &quot;Loading...&quot;.</p>
  <p>What can I do to achieve that?</p>
  <pre><code>                         MotitoFlatButton(
                          label: StringEn.kContinue,
                          enabled: !phoneFieldEmpty,
                          onTap: () {
                            if (_formKey.currentState.validate()) {
  
                              Navigator.push(
                            context,
                            MaterialPageRoute(
                             builder: (context) =&gt;   ResetPasswordVerify()));
                            }
                          },
                        ),
            SizedBox(height: 56.0),
          ],
        ),
      ),
    ),
  );
   }
   }
  </code></pre>
  <p>Here is also the code for the button widget.</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:paylater/res/motito_colors.dart';
  import 'package:paylater/res/style.dart';
  
  const _buttonRadius = 8.0;
  
  class MotitoFlatButton extends StatelessWidget {
  final String label;
  final VoidCallback onTap;
  final Color bg;
  final Color textColor;
  final Color disabledBg;
  final Color disabledTextColor;
  final double width;
  final bool enabled;
  
  const MotitoFlatButton({
  @required this.label,
  @required this.onTap,
  this.bg = MotitoColors.kMotitoBlue,
  this.textColor = Colors.white,
  this.disabledBg = MotitoColors.kButtonDisabled,
  this.disabledTextColor = MotitoColors.kButtonDisabledText,
  this.width = double.infinity,
    this.enabled = true,
   });
  
    @override
    Widget build(BuildContext context) {
     return Material(
      borderRadius: BorderRadius.circular(_buttonRadius),
     child: InkWell(
      onTap: enabled ? onTap : null,
      borderRadius: BorderRadius.circular(_buttonRadius),
      child: Ink(
        padding: const EdgeInsets.symmetric(vertical: 16.0),
        width: width,
        decoration: BoxDecoration(
          color: enabled ? bg : disabledBg,
          borderRadius: BorderRadius.circular(_buttonRadius),
        ),
        child: Center(
          child: Text(
            label,
            style: CustomTextStyles.kBody
                .copyWith(color: enabled ? textColor : disabledTextColor),
          ),
        ),
      ),
    ),
    );
    }
   }
  </code></pre>
  <p>I have tried my best and can't get it to work.</p>