Chrome Extension

Text Style helpers

Widget _buildHeadingSub(mainString, subString) {
  return SizedBox(
    // color: Colors.red,
    width: double.infinity,
    child: Column(
      children: <Widget>[
        Text(
          mainString,
          textAlign: TextAlign.center,
          overflow: TextOverflow.ellipsis,
          style: TextStyle(
            fontSize: 20,
            fontWeight: FontWeight.bold,
          ),
        ),
        SizedBox(
          height: 2.0,
        ),
        Text(
          subString,
          textAlign: TextAlign.center,
          overflow: TextOverflow.ellipsis,
          style: TextStyle(
            fontSize: 15,
            color: Colors.grey[600],
          ),
        ),
      ],
    ),
  );
}

// Leading Icon Header
Widget _buildUI() {
  return Row(
    mainAxisAlignment: MainAxisAlignment.start,
    children: <Widget>[
      Icon(Icons.star, size: 50),
      Expanded(
        child: Container(
          color: Colors.green,
          child: Padding(
            child: Text("Some big heading here"),
            padding: EdgeInsets.all(10.0),
          ),
        ),
      ),
    ],
  );
}
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
Was this helpful?
0 Comments
Join Devsheet Ask a Question