import 'package:flutter/material.dart';

///设置TextField默认值，并且把光标移动到最后
TextEditingController? buildController(name) {
  TextEditingController controller = TextEditingController();
  controller.text = name;
  controller.selection =
      TextSelection.fromPosition(TextPosition(offset: controller.text.length));
  return controller;
}
