📜 License of Assets
This package includes background textures from transparenttextures.com, which are free to use for personal and commercial purposes. Attribution is not required but appreciated. The textures are used inside this package in compliance with their license.
Please do not extract and redistribute the raw image files on their own.
import 'package:flutter/material.dart';
import 'package:texture/texture.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.green,
image: DecorationImage(
image: AssetImage(TexturesGet.beigePaper),
repeat: ImageRepeat.repeat,
),
),
);
}
}