bootstrap_typography2 1.0.3 bootstrap_typography2: ^1.0.3 copied to clipboard
Bootstrap typography, size text based on screen size, uses bootstrap values in pixels
example/lib/main.dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bootstrap/flutter_bootstrap.dart';
import 'package:bootstrap_typography2/bootstrap_typography2.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: SafeArea(
child: Scaffold(
body: Builder(
builder: (BuildContext context) {
return BootstrapContainer(
children: [
BootstrapRow(
children: [
BootstrapCol(
sizes: "col-12",
child: H1(
BSTextParams(
"Hello World!",
textAlignment: TextAlign.center,
weight: FontWeight.bold,
color: Colors.pink,
backgroundColor: Colors.yellow,
),
),
),
],
),
BootstrapRow(
children: [
BootstrapCol(
sizes: "col-12 col-sm-12 col-md-6",
child: H2(
BSTextParams(
"Left",
textAlignment: bootStrapValueBasedOnSize(sizes: {
"": TextAlign.center,
"sm": TextAlign.center,
"md": TextAlign.left,
"lg": TextAlign.left,
"xl": TextAlign.left,
}, context: context),
textDecoration: TextDecoration.underline,
color: Colors.blue,
),
),
),
BootstrapCol(
sizes: "col-12 col-sm-12 col-md-6",
child: H2(
BSTextParams(
"Right",
textAlignment: bootStrapValueBasedOnSize(sizes: {
"": TextAlign.center,
"sm": TextAlign.center,
"md": TextAlign.right,
"lg": TextAlign.right,
"xl": TextAlign.right,
}, context: context),
fontStyle: FontStyle.italic,
color: Colors.green,
),
),
),
],
),
BootstrapRow(
children: [
BootstrapCol(
sizes: "col-12",
child: P(
BSTextParams(
"Basic 'P' text, you would put some text in here ... blah blah blah"),
),
),
],
),
],
);
},
),
),
),
),
);
}