in flutter how can i fill image with pattern? for example i want to fill screen by this square image
my code doesn't work:
Widget build(BuildContext context) {
return Consumer<ThemeManager>(builder: (context, theme, child) {
return Directionality(
textDirection: TextDirection.rtl,
child: Container(
width: double.infinity,
height: double.infinity,
child: Stack(
children: <Widget>[
Image.asset('assets/images/sBoeM.jpg',repeat: ImageRepeat.repeat,),
],
),
),
);
});
}
you need to wrap your Image widget with Positioned.fill widget
Positioned.fill(
child: Image.asset(
'images/sBoeM.jpg',
repeat: ImageRepeat.repeat,
),
),