Does that help For the import part, you can use one of the below, they have the same meaning:
import 'package:your_project_name/utils.dart';
import './utils.dart';
import 'utils.dart';
import './utils.dart' as utils;
utils.getProgressHeaderStyle()
abstract class ThemeText {
static const TextStyle progressHeader = TextStyle(
fontFamily: 'Montserrat',
color: ThemeColor.bodyText,
fontSize: 40,
height: 0.5,
fontWeight: FontWeight.w600);
}
abstract class ThemeText {
static const TextStyle progressHeader = TextStyle(
fontFamily: 'Montserrat',
color: Colors.black,
fontSize: 40,
height: 0.5,
fontWeight: FontWeight.w600);
static const TextStyle progressBody = TextStyle(
fontFamily: 'Montserrat',
color: Colors.white,
fontSize: 10,
height: 0.5,
fontWeight: FontWeight.w400);
static const TextStyle progressFooter = TextStyle(
fontFamily: 'Montserrat',
color: Colors.black,
fontSize: 20,
height: 0.5,
fontWeight: FontWeight.w600);
}
ThemeText.progressHeader;
ThemeText.progressBody;
ThemeText.progressFooter;
TextStyle getProgressHeaderStyle() {
return const TextStyle(
color: ThemeColor.bodyText,
fontFamily: 'Montserrat',
fontWeight: FontWeight.w600,
fontSize: 40.0,
height: 0.5);
}
TextStyle getProgressHeaderStyle() {
return const TextStyle(
color: ThemeColor.bodyText,
fontFamily: 'Montserrat',
fontWeight: FontWeight.w600,
fontSize: 40.0,
height: 0.5);
}
TextStyle getProgressBodyStyle() {
return const TextStyle(
fontFamily: 'Montserrat',
color: Colors.white,
fontSize: 10,
height: 0.5,
fontWeight: FontWeight.w400);
}
TextStyle getProgressFooterStyle() {
return const TextStyle(
fontFamily: 'Montserrat',
color: Colors.black,
fontSize: 20,
height: 0.5,
fontWeight: FontWeight.w600);
}
utils.getProgressHeaderStyle();
utils.getProgressBodyStyle();
utils.getProgressFooterStyle();