Receive result from DialogFragment

I am using DialogFragments for a number of things: choosing item from list, entering text. What is the best way to return a value (i.e. a string or an item from a list) back to the calling activity/fragment? Currently I am making the calling activity implement DismissListener and giving the DialogFragment a reference to the … Read more

How can I dismiss the on screen keyboard?

I am collecting user input with a TextFormField and when the user presses a FloatingActionButton indicating they are done, I want to dismiss the on screen keyboard. How do I make the keyboard go away automatically? import ‘package:flutter/material.dart’; class MyHomePage extends StatefulWidget { MyHomePageState createState() => new MyHomePageState(); } class MyHomePageState extends State<MyHomePage> { TextEditingController … Read more