2024-03-21 08:39:25 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2024-03-26 16:17:04 +00:00
|
|
|
import 'package:softplayer_web/pages/about.dart';
|
|
|
|
import 'package:softplayer_web/pages/catalog.dart';
|
|
|
|
import 'package:softplayer_web/pages/home.dart';
|
|
|
|
// import 'package:grpc/grpc.dart';
|
|
|
|
// import 'package:softplayer_dart_proto/accounts/accounts_v1.pb.dart';
|
|
|
|
// import 'package:softplayer_dart_proto/main.dart';
|
|
|
|
// import 'package:grpc/grpc_web.dart';
|
2024-03-21 08:39:25 +00:00
|
|
|
|
|
|
|
void main() async {
|
2024-03-26 16:17:04 +00:00
|
|
|
// GrpcWebClientChannel channel = GrpcWebClientChannel.xhr(Uri.parse('http://softplayer.badhouseplants.net:80'));
|
|
|
|
// final stub = AccountsClient(channel);
|
|
|
|
// final accWithPassword = AccountWithPassword(
|
|
|
|
// data: AccountData(
|
|
|
|
// name: "test",
|
|
|
|
// email: "test@test.test",
|
|
|
|
// ),
|
|
|
|
// accountPassword: AccountPassword(password: "test"),
|
|
|
|
// );
|
|
|
|
//
|
|
|
|
// try {
|
|
|
|
// final response = await stub.signUp(
|
|
|
|
// accWithPassword,
|
|
|
|
// );
|
|
|
|
// print('Greeter client received: ${response}');
|
|
|
|
// } catch (e) {
|
|
|
|
// print('Caught error: $e');
|
|
|
|
// }
|
2024-03-21 08:39:25 +00:00
|
|
|
runApp(const MyApp());
|
|
|
|
}
|
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
|
|
const MyApp({super.key});
|
|
|
|
|
|
|
|
// This widget is the root of your application.
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return MaterialApp(
|
2024-03-26 16:17:04 +00:00
|
|
|
debugShowCheckedModeBanner: false,
|
2024-03-21 08:39:25 +00:00
|
|
|
title: 'Flutter Demo',
|
2024-03-26 16:17:04 +00:00
|
|
|
routes: {
|
2024-03-27 21:07:53 +00:00
|
|
|
'/': (context) => const HomePage(),
|
|
|
|
'/catalog': (context) => const CatalogPage(),
|
|
|
|
'/about': (context) => const AboutPage(),
|
2024-03-26 16:17:04 +00:00
|
|
|
},
|
|
|
|
|
2024-03-21 08:39:25 +00:00
|
|
|
theme: ThemeData(
|
|
|
|
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
|
|
|
useMaterial3: true,
|
|
|
|
),
|
2024-03-26 16:17:04 +00:00
|
|
|
//home: const MyHomePage(title: 'Flutter Demo Home Page'),
|
2024-03-21 08:39:25 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|