Merge branch 'singleR' into 'master'

Single r

See merge request Cloud_Solution/queuing_system!1
dev_faiz
Elham Ali 4 years ago
commit 79df7137c2

@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import 'package:queuing_system/core/base/app_scaffold_widget.dart';
import 'package:queuing_system/utils/signalR_utils.dart';
class MyHomePage extends StatefulWidget {
String title ="MyHomePage";
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
SignalRHelper signalRHelper= SignalRHelper();
return AppScaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
signalRHelper.msg,
),
],
),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}

@ -1,9 +1,11 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:queuing_system/utils/signalR_utils.dart';
import 'core/base/app_scaffold_widget.dart'; import 'core/base/app_scaffold_widget.dart';
import 'core/base/project_view_model.dart'; import 'core/base/project_view_model.dart';
import 'core/config/size_config.dart'; import 'core/config/size_config.dart';
import 'home/home_screen.dart';
void main() { void main() {
runApp(const MyApp()); runApp(const MyApp());
@ -47,58 +49,3 @@ class MyApp extends StatelessWidget {
} }
} }
class MyHomePage extends StatefulWidget {
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
String title ="MyHomePage";
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
// This call to setState tells the Flutter framework that something has
// changed in this State, which causes it to rerun the build method below
// so that the display can reflect the updated values. If we changed
// _counter without calling setState(), then the build method would not be
// called again, and so nothing would appear to happen.
_counter++;
});
}
@override
Widget build(BuildContext context) {
return AppScaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
],
),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}

@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
import 'package:signalr_core/signalr_core.dart';
class SignalRHelper{
String hubBaseURL ="";
String msg ="Elham";
HubConnection connection;
SignalRHelper(){
connection = HubConnectionBuilder()
.withUrl(
hubBaseURL,
HttpConnectionOptions(
logging: (level, message) {
msg = message;
print("$message");
},
)
).build();
}
closeConnection(BuildContext context) async {
if(connection.state == HubConnectionState.connected)
{
await connection.stop();
}
}
}

@ -71,6 +71,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "2.0.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
equatable:
dependency: transitive
description:
name: equatable
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@ -149,6 +163,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.1" version: "1.0.1"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
@ -212,6 +233,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.0.2" version: "6.0.2"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1+1"
signalr_core:
dependency: "direct main"
description:
name: signalr_core
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
@ -224,6 +259,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.8.1"
sse_client:
dependency: transitive
description:
name: sse_client
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -259,6 +301,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.3" version: "0.4.3"
tuple:
dependency: transitive
description:
name: tuple
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -273,6 +322,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1" version: "2.1.1"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
xml: xml:
dependency: transitive dependency: transitive
description: description:

@ -39,6 +39,10 @@ dependencies:
flutter_svg: ^1.0.3 flutter_svg: ^1.0.3
http: ^0.13.0 http: ^0.13.0
#signalr core
signalr_core: ^1.1.1

Loading…
Cancel
Save