pos_client 0.0.1
pos_client: ^0.0.1 copied to clipboard
A Flutter SDK that enables Point of Sale (POS) systems to accept cryptocurrency payments through WalletConnect network
example/lib/main.dart
import 'package:example/screens/welcome_screen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter/foundation.dart' show kIsWeb;
void main() {
runApp(ProviderScope(child: const MyApp()));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
),
home: const ResponsiveLayout(child: WelcomeScreen()),
builder: (context, child) {
if (!kIsWeb) return child!;
return ResponsiveLayout(child: child!);
},
);
}
}
class ResponsiveLayout extends StatelessWidget {
final Widget child;
final double maxWidth;
const ResponsiveLayout({
super.key,
required this.child,
this.maxWidth = 600.0,
});
@override
Widget build(BuildContext context) {
if (!kIsWeb) {
return child;
}
return Scaffold(
backgroundColor: Colors.grey[100],
body: Center(
child: Container(
constraints: BoxConstraints(
maxWidth: maxWidth,
minHeight: MediaQuery.of(context).size.height,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.1),
blurRadius: 20,
offset: const Offset(0, 10),
spreadRadius: 2,
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(8),
child: child,
),
),
),
);
}
}