Question: Refer to the code fragment below: Widget build ( BuildContext context ) { return ScaffoldC body: FocusC onkeyEvent: ( node , event ) { if

Refer to the code fragment below:
Widget build(BuildContext context){
return ScaffoldC
body: FocusC
onkeyEvent: (node, event){
if (event. logicalKey == LogicalKeyboardKey.capsLock){
setState(C){
text ='Hi';
}
});
else {
setState((){
text = 'Bye';
});
}
},
return KeyEventResult.ignored;
child: FormC
//...
)
;
}
When is 'Hi' assigned to _text?
When the user focuses on a form field and the caps lock key is currently on.
When the user presses any key on the keyboard and the caps lock key is currently on.
 Refer to the code fragment below: Widget build(BuildContext context){ return ScaffoldC

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!