This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return StreamChat( | |
client: client, | |
child: MaterialApp( | |
... | |
home: ResponsiveWidget( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ResponsiveWidget extends StatelessWidget { | |
final Widget smallScreen; | |
final Widget mediumScreen; | |
final Widget largeScreen; | |
const ResponsiveWidget({Key key, | |
this.mediumScreen, | |
@required this.smallScreen, | |
this.largeScreen}) | |
: super(key: key); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final theme = | |
ThemeData(primarySwatch: Colors.teal, brightness: Brightness.dark); | |
MaterialApp( | |
debugShowCheckedModeBanner: false, | |
theme: theme, | |
builder: (context, child) => StreamChat( | |
streamChatThemeData: StreamChatThemeData.fromTheme(theme), | |
client: client, | |
child: child, | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: ChannelHeader( | |
showBackButton: showBackButton, | |
), | |
body: Column( | |
children: <Widget>[ | |
Expanded( | |
child: MessageListView(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widget build(BuildContext context) { | |
return Scaffold( | |
//backgroundColor: Colors.white, | |
body: ChannelsBloc( | |
child: ChannelListView( | |
onChannelTap: onItemTap != null | |
? (channel, _) { | |
onItemTap(channel); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<void> main() async { | |
//Create stream clien | |
//Create users | |
//Create channels | |
//Step 1 | |
final channel = client.channel( | |
"messaging", | |
id: "guitarist", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter_desktop_chat_app/responsive_builder.dart'; | |
import 'package:stream_chat_flutter/stream_chat_flutter.dart'; | |
//Before | |
void main() { | |
runApp(MyApp()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
/// This Widget is the main application widget. | |
class AboutDemo extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
darkTheme: ThemeData.dark(), | |
theme: ThemeData(brightness: Brightness.dark), |