Skip to content
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

how to use it with below FAB code #31

Open
ABINASH56 opened this issue Nov 4, 2019 · 1 comment
Open

how to use it with below FAB code #31

ABINASH56 opened this issue Nov 4, 2019 · 1 comment

Comments

@ABINASH56
Copy link

import 'package:flutter/material.dart';
import 'package:dynamic_theme/dynamic_theme.dart';
import 'package:fab_circular_menu/fab_circular_menu.dart';

class FabDialer extends StatefulWidget {
  FabDialer({Key key, this.title}) : super(key: key);
  final String title;
  @override
  _FabDialerState createState() => _FabDialerState();
}

class _FabDialerState extends State<FabDialer> {
  @override
  Widget build(BuildContext context) {
    return FabCircularMenu(
      child: Container(
        color: Colors.indigo[900],
        child: Center(
            child: Padding(
              padding: const EdgeInsets.only(bottom: 256.0),
              child: Text(
                  'FAB Circle Menu Example',
                  textAlign: TextAlign.center,
                  style: TextStyle(color: Colors.white, fontSize: 36.0)
              ),
            )
        ),
      ),
      ringColor: Colors.white30,
      options: <Widget>[
        IconButton(icon: Icon(Icons.widgets), onPressed: showChooser,
              iconSize: 48.0, color: Colors.white),
        IconButton(icon: Icon(Icons.widgets), onPressed: () {}, iconSize: 48.0, color: Colors.white),
        IconButton(icon: Icon(Icons.widgets), onPressed: () {}, iconSize: 48.0, color: Colors.white),
        IconButton(icon: Icon(Icons.widgets), onPressed: () {}, iconSize: 48.0, color: Colors.white),
      ],
    );
  }
}

void showChooser() {
showDialog(
context: context,
builder: (context) {
return BrightnessSwitcherDialog(
onSelectedTheme: (brightness) {
DynamicTheme.of(context).setBrightness(brightness);
},
);
});
}

@Norbert515
Copy link
Owner

What exactly is the question? Doesn't it work this way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants