first commit

This commit is contained in:
2026-01-20 16:34:54 +07:00
commit 2ac772b6de
4186 changed files with 123824 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
import 'package:flutter/material.dart';
class OpacityDialog extends StatefulWidget {
final double initial;
const OpacityDialog({super.key, required this.initial});
@override
_OpacityDialogState createState() => _OpacityDialogState();
}
class _OpacityDialogState extends State<OpacityDialog> {
late double val;
@override
void initState() {
super.initState();
val = widget.initial;
}
@override
Widget build(BuildContext context) {
return AlertDialog(
title: Text('Opacity Watermark'),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
Slider(
value: val,
min: 0.1,
max: 1.0,
divisions: 9,
label: '${(val * 100).toStringAsFixed(0)}%',
onChanged: (v) => setState(() => val = v),
),
SizedBox(height: 8),
Text('Preview: ${(val * 100).toStringAsFixed(0)}%'),
],
),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: Text('Batal'),
),
TextButton(
onPressed: () => Navigator.pop(context, val),
child: Text('OK'),
),
],
);
}
}