import 'package:custom_qr_generator/colors/color.dart'; import 'package:custom_qr_generator/options/colors.dart'; import 'package:custom_qr_generator/options/options.dart'; import 'package:custom_qr_generator/options/shapes.dart'; import 'package:custom_qr_generator/qr_painter.dart'; import 'package:custom_qr_generator/shapes/ball_shape.dart'; import 'package:custom_qr_generator/shapes/frame_shape.dart'; import 'package:custom_qr_generator/shapes/pixel_shape.dart'; import 'package:flutter/material.dart'; class QrCode extends StatelessWidget { final String text; const QrCode({super.key, required this.text}); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: const Text('Считанный qr'), ), body: Center( child: CustomPaint( size: const Size(350, 350), painter: QrPainter( data: text, options: const QrOptions( shapes: QrShapes( darkPixel: QrPixelShapeRoundCorners(cornerFraction: .5), frame: QrFrameShapeRoundCorners(cornerFraction: .25), ball: QrBallShapeRoundCorners(cornerFraction: .25)), colors: QrColors( dark: QrColorLinearGradient(colors: [ Color.fromARGB(255, 255, 0, 0), Color.fromARGB(255, 0, 0, 255) ], orientation: GradientOrientation.leftDiagonal)))), )), ); } }