-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context lost for FocusNode #116
Comments
I get the same error. It happens after the second time Reproducable import 'package:datetime_picker_formfield/datetime_picker_formfield.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'DateTimeField Error Demo'),
);
}
}
class MyHomePage extends StatelessWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(title),
),
body: Center(
child: Form(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextFormField(
textInputAction: TextInputAction.next,
onEditingComplete: () =>
FocusScope.of(context).nextFocus(), // Throws error
),
TextFormField(
textInputAction: TextInputAction
.next, // Doesn't throw error, but doesnt work
),
DateTimeField(
format: DateFormat.yMd(),
onShowPicker: // Tap 2 times and calling .nextFocus() doesn't work anymore
(BuildContext context, DateTime currentValue) async {
return DateTime.now();
},
),
],
),
),
),
);
}
}
|
Have the same issue, any fix? |
I also have the same issue. Any update? |
1 similar comment
I also have the same issue. Any update? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using:
I have the following code
Steps to replicate the error:
What could I do about this?
The text was updated successfully, but these errors were encountered: