title: Simple dialog on pressing Floating action button for Flutter
body: <p>Im a beginner in flutter and i need some help in figuring what went wrong with my code here</p>
  
  <p>i am trying to make the floating action button display a simple dialog (and add content) but i am unsure why i am unable to bring the simple dialog out when i press the FAB.I am aware that it has to be within the stateless widget but i cant seem to insert the FAB within the stateless/stateful widget segment.Is there a work-around for this?</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <pre><code> void main() {
      runApp(MaterialApp(
       debugShowCheckedModeBanner: false,
       home: Scaffold(
         bottomNavigationBar: BottomAppBar(
           child: Text(
             "test bottom",
            style: TextStyle(
              color: Color(0xffFFFFFF),
               fontSize: 10,
              ),
             textAlign: TextAlign.center,
            ),
            color: Colors.blueGrey[600],
            ),
           backgroundColor: Colors.lightBlueAccent[50],
               appBar: AppBar(
            title: Text('test'),
             backgroundColor: Colors.blueGrey[600],
          ),
          body: SoundTest(),
         floatingActionButton: FloatingActionButton(
            backgroundColor: Colors.blue,
           child: Icon(Icons.priority_high),
           onPressed: () {
             print('hello');
          },
         ),
       ),
        ));
       }
  
   class SoundTest extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
       return Column(
    crossAxisAlignment: CrossAxisAlignment.stretch,
  
    children: &lt;Widget&gt;[
      Expanded(
        child: FlatButton(
          child: Image.asset('images/softsound.png'),
          onPressed: () {
            final player = AudioCache();
            player.play('clicksoft.wav');
            showDialog(context: context,
            );
          },
        ),
      ),
      Expanded(
        child: FlatButton(
            child: Image.asset('images/loudsound.png'),
            onPressed: () {
              final player = AudioCache();
              player.play('clickloud.wav');
            }),
           )
          ],
        );
       }
    }
  </code></pre>