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

SpeedDialChild shape is ignored #58

Closed
KhatibFX opened this issue Mar 15, 2020 · 10 comments
Closed

SpeedDialChild shape is ignored #58

KhatibFX opened this issue Mar 15, 2020 · 10 comments

Comments

@KhatibFX
Copy link

KhatibFX commented Mar 15, 2020

Screenshot_1584258931
Hi! I am running into an issue where the children of speed dial are ignoring the shape parameter provided, although the speed dial itself is rendering its shape normally. Here is a minimum example that shows this:

import 'package:flutter/material.dart';
import 'package:flutter_speed_dial/flutter_speed_dial.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: SpeedDial(
        animatedIcon: AnimatedIcons.menu_close,
        animatedIconTheme: const IconThemeData(size: 22.0),
        closeManually: true,
        curve: Curves.bounceIn,
        tooltip: 'Toggle options',
        backgroundColor: Colors.black,
        foregroundColor: Colors.white,
        elevation: 8.0,
        shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
        children: [
          SpeedDialChild(
              shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(10)),
              child: Icon(Icons.accessibility),
              foregroundColor: Colors.white,
              backgroundColor: Colors.black,
              onTap: () => print('FIRST CHILD')),
        ],
      ),
    );
  }
}
@m0veax
Copy link
Contributor

m0veax commented Jun 17, 2020

Hi,

we have the same Error in our Project.

Could it be, that the Problem exists here:

https://github.com/darioielardi/flutter_speed_dial/blob/master/lib/src/animated_floating_button.dart#L25

EDIT: This exist in more then one places in the sourcebase, we are trying to get rectangles working, but somewhere the widht and length gets overwritten

@m0veax
Copy link
Contributor

m0veax commented Jun 17, 2020

I wrote a quick fix above. It works for me, would you like to test it?

@prateekmedia
Copy link
Collaborator

Hey, you can checkout my fork, it already has this feature
https://github.com/prateekmedia/flutter_speed_dial

@m0veax
Copy link
Contributor

m0veax commented Jan 29, 2021

Maybe you give some credit too :)

@prateekmedia
Copy link
Collaborator

I wrote a quick fix above. It works for me, would you like to test it?

Maybe you give some credit too :)

Already Given
https://github.com/prateekmedia/flutter_speed_dial/commit/fd1ae441bb7b1b9e0888a60cbd2cb4ba66bdd189

I am just assembling some good PR's and fixing some issues in them so that they can work perfectly all together

@m0veax
Copy link
Contributor

m0veax commented Jan 29, 2021

Oh sry, that looked somehow different in the mail notifications :)

Let us behave like I never wrote that.

Have a good day ✌️

@m0veax
Copy link
Contributor

m0veax commented Jan 29, 2021

Do you plan to actively maintain the package?

Maybe we can share the maintainership by using an organization and give the package a new name.

I'm using it in several apps and don't want it to die.

On the other way, I don't have enough time to maintain it alone

@prateekmedia
Copy link
Collaborator

Do you plan to actively maintain the package?

Maybe we can share the maintainership by using an organization and give the package a new name.

I'm using it in several apps and don't want it to die.

On the other way, I don't have enough time to maintain it alone

Yep, I am planning to maintain it as this is missing crucial features that should be present in it and also the pull requests are pending.

@m0veax
Copy link
Contributor

m0veax commented Jan 29, 2021

Nice, I'm watching the repo and will help out on issues if I find some time.

I will change my dependencies if I have to touch my apps the next time.

@prateekmedia
Copy link
Collaborator

Checkout #90 i.e. V2 if it persists then reopen the issue.

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

3 participants