flutter_magento_marketplace 1.0.0
flutter_magento_marketplace: ^1.0.0 copied to clipboard
Flutter library for Magento 2 Marketplace functionality with multi-seller support, subdomains, ratings, and messaging
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
void main() {
runApp(
ProviderScope(
child: const MarketplaceApp(),
),
);
}
class MarketplaceApp extends StatelessWidget {
const MarketplaceApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Magento Marketplace',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
useMaterial3: true,
),
home: const MarketplaceHomeScreen(),
debugShowCheckedModeBanner: false,
);
}
}
class MarketplaceHomeScreen extends ConsumerStatefulWidget {
const MarketplaceHomeScreen({super.key});
@override
ConsumerState<MarketplaceHomeScreen> createState() =>
_MarketplaceHomeScreenState();
}
class _MarketplaceHomeScreenState extends ConsumerState<MarketplaceHomeScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Marketplace'),
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
actions: [
IconButton(
onPressed: () {
// Navigate to search
},
icon: const Icon(Icons.search),
),
IconButton(
onPressed: () {
// Navigate to notifications
},
icon: const Icon(Icons.notifications_outlined),
),
],
),
body: const Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.storefront, size: 64, color: Colors.blue),
SizedBox(height: 16),
Text(
'Welcome to Marketplace',
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
SizedBox(height: 8),
Text(
'Discover amazing sellers and products',
style: TextStyle(fontSize: 16, color: Colors.grey),
),
],
),
),
floatingActionButton: FloatingActionButton.extended(
onPressed: () {
// Navigate to search
},
icon: const Icon(Icons.search),
label: const Text('Search'),
),
);
}
}