import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class RRTRequestPage extends StatefulWidget{ @override State createState() => RRTRequestPageState(); } class RRTRequestPageState extends State{ @override Widget build(BuildContext context) { return ListView( padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15), children: [ serviceDescription(context), SizedBox(height: 20), priceTable(context), ], ); } Widget serviceDescription(BuildContext context) => Padding( padding: const EdgeInsets.symmetric(horizontal: 10), child: Text( "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home", textAlign: TextAlign.justify, style: TextStyle(color: Theme.of(context).appBarTheme.color, fontSize: 15, height: 1.5, fontWeight: FontWeight.w300), ), ); Widget priceTable(BuildContext context){ var radius = Radius.circular(8); return Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Container( height: 30, decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)), child: Center(child: Text("Approximate Service Fee", style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))), ) ], ); } }