Blur text inside a container

This Article is posted by seven.srikanth at 10/2/2021 9:52:37 AM



Here is an example, of how to blur text inside a container.
Complete code from main.dart file.

import 'dart:ui';
import 'package:flutter/material.dart';
main(List<String> args) {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@ override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(body: MyHomePage()),
);
}
}
class MyHomePage extends StatelessWidget {
@ override
Widget build(BuildContext context) {
return Center(
child: ImageFiltered(
imageFilter: ImageFilter.blur(sigmaX: 8, sigmaY: 8),
child: Container(
color: Colors.green,
child: Text(
'Hello World!',
style: TextStyle(fontSize: 50),
),
),
));
}
}
Thanks,
Srikanth

Tags: Blur text; fade text;








0 Comments
Login to comment.
Recent Comments












© 2018 - Fluttercentral | Email to me - seven.srikanth@gmail.com