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 #15

Open
Diljithhh opened this issue Nov 15, 2021 · 0 comments
Open

font awesome icons are not showing #15

Diljithhh opened this issue Nov 15, 2021 · 0 comments

Comments

@Diljithhh
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.
also my .yaml is correct.

import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'reusable_Card.dart';
import 'icon_file.dart';
import 'constants.dart';

enum gender { male, female }
const appbarHeight = 35.0;

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

class _InputPageState extends State {
gender selectedGender;

@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('BMI CALCULATOR'),
),
body: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [
Expanded(
child: Row(
children: [
Expanded(
child: ReusableCard(
onPress: () {
setState(() {
selectedGender = gender.male;
});
},
colour: selectedGender == gender.male
? kActivecardColor
: kInactivecardColor,
cardchild: IconContent(
icon: FontAwesomeIcons.mars,
label: 'MALE',
),
),
),
Expanded(
child: ReusableCard(
onPress: () {
setState(() {
selectedGender = gender.female;
});
},
colour: selectedGender == gender.female
? kActivecardColor
: kInactivecardColor,
cardchild: IconContent(
icon: FontAwesomeIcons.venus,
label: 'women',
),
),
)
],
)),
Expanded(
child: ReusableCard(
cardchild: Column(mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'HEIGHT',
style: kLabelTextStyle,
),
Row(mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'180',
style: kNumberTextstyle,
),Text('cm',style: kLabelTextStyle,)
],
)
],
),
colour: kInactivecardColor)),
Expanded(
child: Row(
children: [
Expanded(child: ReusableCard(colour: kInactivecardColor)),
Expanded(child: ReusableCard(colour: kInactivecardColor))
],
)),
Container(
color: kBottombarColor,
margin: EdgeInsets.only(top: 10.0),
width: double.infinity,
height: appbarHeight,
)
]));
}
}

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

1 participant