Baseline Widget
Project Preview
- Interested in seeing the live demo? Click here to explore.
- Want to view the source code? Visit the project on GitHub.
Code Snippet
import 'package:flutter/material.dart';
class BaselineWidget extends StatelessWidget {
const BaselineWidget({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Baseline Widget"),
),
body: Center(
child: Container(
width: 200,
height: 200,
color: Colors.orange,
child: const Baseline(
baseline: 50,
baselineType: TextBaseline.alphabetic,
child: FlutterLogo(size: 50),
),
),
),
);
}
}