import 'package:flutter/material.dart';
import 'dart:ui';
void main() {
runApp(
MaterialApp(
home: MyWidget(),
),
);
}
class MyWidget extends StatefulWidget {
MyWidget();
_MyWidgetState createState() => _MyWidgetState();
}
class _MyWidgetState extends State<MyWidget> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Stack(
children: <Widget>[
Text(
'見えますか' * 500,
style: TextStyle(
color: Colors.blue,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
Center(
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: 4,
sigmaY: 5,
),
child: SizedBox(
width: 500,
height: 250,
child: Text(
'これ見える:$_counter',
style: Theme.of(context).textTheme.headline3,
),
),
),
)
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'プラス',
child: Icon(Icons.add),
),
);
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.