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

font awesome icons are not showing #9

Open
meAtifkhan opened this issue Aug 31, 2020 · 10 comments
Open

font awesome icons are not showing #9

meAtifkhan opened this issue Aug 31, 2020 · 10 comments

Comments

@meAtifkhan
Copy link

I have tried everything
Stopping the app
Running flutter clean in your app directory
Deleting the app from your simulator / emulator / device
Rebuild & Deploy the app.
all these steps but the icons and text on card is not showing

@felipecastrosales
Copy link

how is your pubspack.yaml file? that's right?

@meAtifkhan
Copy link
Author

@felipecastrosales yes my pubspack.yaml file is right i checked

@felipecastrosales
Copy link

send here what to apply to your terminal, please

@melmslmany
Copy link

Stop your app and rebuild it and start it again

@manandarial
Copy link

Hi, did you manage to fix the problem? I'm facing similar issue.

@felipecastrosales
Copy link

Hello @manandarial, what´s your problem? What your message in terminal?
Good Studies!

@manandarial
Copy link

manandarial commented Dec 23, 2020

Hello @felipecastrosales, thank you for taking your time and replying. I found the problem. I forgot to declare cardChild property in the build function. How did I miss that!? Maybe it happens after binge watching the course. This course got me hooked. I need to take rest in between so my brain functions normally again.

@felipecastrosales
Copy link

hello @manandarial, for nothing, anu doubts I am at your disposal, and glad you managed to solve your problem, this is part of the learning process.
Always have a moment of your day for leisure, rest is very important.

@fobf
Copy link

fobf commented Sep 16, 2021

I have a problem with ReusabeCard, nothing is displayed inside Colimn's children. But when I use it on another place without this custom widget everything works fine.

import 'package:font_awesome_flutter/font_awesome_flutter.dart';

const double bottomContainerHeight = 80;
const activeCardColor = Color(0xFF1D1E33);

class InputPage extends StatefulWidget {
  @override
  _InputPageState createState() => _InputPageState();
}

class _InputPageState extends State<InputPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('BMI CALCULATOR'),
      ),
      body: Column(
        children: [
          Expanded(
            child: Row(
              children: [
                Expanded(
                  child: ReusableCard(
                    color: activeCardColor,
                    cardChild: IconContent(),
                  ),
                ),
                Expanded(
                  child: ReusableCard(
                    color: activeCardColor,
                  ),
                ),
              ],
            ),
          ),
          Expanded(
            child: ReusableCard(
              color: activeCardColor,
            ),
          ),
          Expanded(
            child: Row(
              children: [
                Expanded(
                  child: ReusableCard(
                    color: activeCardColor,
                  ),
                ),
                Expanded(
                  child: ReusableCard(
                    color: activeCardColor,
                  ),
                ),
              ],
            ),
          ),
          Container(
            width: double.infinity,
            color: Color(0xFFEB1555),
            margin: EdgeInsets.only(top: 10),
            height: bottomContainerHeight,
          ),
        ],
      ),
    );
  }
}

class IconContent extends StatelessWidget {
  const IconContent({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        const FaIcon(FontAwesomeIcons.mars, size: 80),
        SizedBox(height: 15),
        Text(
          'MALE',
          style: TextStyle(
            fontSize: 80.0,
            color: Color(0xFF8D8E96),
          ),
        )
      ],
    );
  }
}

class ReusableCard extends StatelessWidget {
  ReusableCard({
    required this.color,
    this.cardChild,
  });

  final Color color;
  final Widget? cardChild;

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.all(15),
      decoration: BoxDecoration(
        color: color,
        borderRadius: BorderRadius.circular(10),
      ),
    );
  }
}

@fobf
Copy link

fobf commented Sep 17, 2021

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

5 participants