Skip to content

Instantly share code, notes, and snippets.

View pinkeshdarji's full-sized avatar
💭
Feedback please 👂

Pinkesh Darji pinkeshdarji

💭
Feedback please 👂
View GitHub Profile
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return StreamChat(
client: client,
child: MaterialApp(
...
home: ResponsiveWidget(
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);
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,
),
Widget build(BuildContext context) {
return Scaffold(
appBar: ChannelHeader(
showBackButton: showBackButton,
),
body: Column(
children: <Widget>[
Expanded(
child: MessageListView(),
Widget build(BuildContext context) {
return Scaffold(
//backgroundColor: Colors.white,
body: ChannelsBloc(
child: ChannelListView(
onChannelTap: onItemTap != null
? (channel, _) {
onItemTap(channel);
}
Future<void> main() async {
//Create stream clien
//Create users
//Create channels
//Step 1
final channel = client.channel(
"messaging",
id: "guitarist",
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());
}
// 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
// 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
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),