input_done_view.dart 1012 Bytes

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:one_key/res/colors.dart';

class InputDoneView extends StatelessWidget {
  final VoidCallback? callback;
  const InputDoneView({Key? key, this.callback}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      color: Colors.white,
      child: Align(
        alignment: Alignment.topRight,
        child: Padding(
          padding: const EdgeInsets.only(top: 4.0, bottom: 4.0),
          child: CupertinoButton(
            padding: EdgeInsets.only(right: 24.0, top: 8.0, bottom: 8.0),
            onPressed: () {
              FocusScope.of(context).requestFocus(new FocusNode());
              callback!();
            },
            child: Text("完成",
                style: TextStyle(
                    color: MyColours.color_199095,
                    fontWeight: FontWeight.bold)),
          ),
        ),
      ),
    );
  }
}