title: Creating a Custom widget in Flutter
body: <pre><code>import 'package:flutter/material.dart';
  import 'package:font_awesome_flutter/font_awesome_flutter.dart';
  
  int _weight =60;
  
  class RoundIconData extends StatefulWidget {
  
  @override
  _RoundIconDataState createState() =&gt; _RoundIconDataState();
  }
  class _RoundIconDataState extends State&lt;RoundIconData&gt; {
  
  RoundIconData({@required this.icon,@required this.pressme});
  final IconData icon;
  final int pressme;
  
  @override
  Widget build(BuildContext context) {
   return RawMaterialButton(
     child: Icon(icon),
     onPressed: (){
      setState(() {
        if(icon == FontAwesomeIcons.minus){
          _weight--;
        }
        else{
          _weight++
        }
      });
    },
    elevation: 6.0,
    constraints: BoxConstraints.tightFor(
      width: 56.0,
      height: 56.0,
    ),
    shape: CircleBorder(),
    fillColor: Color(0xFF4C4F5E),
  );
  }
  }
  </code></pre>
  
  <p>i am getting error while creating this. </p>
  
  <p><strong>What i Want</strong></p>
  
  <p>Custom widget with RawmaterialButton through which i can add icons.
  if i add icon.minus then my given private weight wants to be decremented
  else 
  given private weights to be incremented</p>