-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
customer: alibabaengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Steps to Reproduce
- Execute
flutter runon the code sample - Tap the
TextFieldin the page ,and tap the blank area orFloatingActionButtonto remove focus
Expected results:
with_animation.MP4
Actual results:
no_animation.MP4
Code sample
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
static final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
Map<String, dynamic> deviceData = <String, dynamic>{};
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const TextFieldPage(),
);
}
}
class TextFieldPage extends StatefulWidget {
const TextFieldPage({Key? key}) : super(key: key);
@override
_TextFieldPageState createState() => _TextFieldPageState();
}
class _TextFieldPageState extends State<TextFieldPage> {
TextEditingController controller = TextEditingController();
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
FocusScope.of(context).unfocus();
},
child: Scaffold(
floatingActionButton: FloatingActionButton(
onPressed: () {
FocusScope.of(context).unfocus();
},
),
body: Center(
child: SizedBox(
height: 50,
child: CupertinoTextField(
decoration: BoxDecoration(color: Colors.grey[200]),
controller: controller,
),
),
),
),
);
}
}Metadata
Metadata
Assignees
Labels
customer: alibabaengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version