Skip to content

Instantly share code, notes, and snippets.

View ayush221b's full-sized avatar
👋
Building with Flutter, for Flutter

Ayush Shekhar ayush221b

👋
Building with Flutter, for Flutter
View GitHub Profile
@ayush221b
ayush221b / main.dart
Created March 3, 2022 08:47
Making the MessageListView in Stream Chat transparent
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
/// Create a new instance of [StreamChatClient] passing the apikey obtained
/// from your project dashboard.
final client = StreamChatClient(
's2dxdhpxd94g',
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
class MyInAppBrowser extends InAppBrowser {
@override
Future onLoadStart(String url) async {
print("\n\nStarted $url\n\n");
}
@override
Future onLoadStop(String url) async {
print("\n\nStopped $url\n\n");
}
@ayush221b
ayush221b / train.py
Last active March 3, 2020 03:10
For three categories
# USAGE
# python train.py --dataset Sports-Type-Classifier/data --model model/activity.model --label-bin model/lb.pickle --epochs 50
# set the matplotlib backend so figures can be saved in the background
import matplotlib
matplotlib.use("Agg")
# import the necessary packages
from keras.preprocessing.image import ImageDataGenerator
from keras.layers.pooling import AveragePooling2D
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@ayush221b
ayush221b / index.html - Flutter for Web
Created May 8, 2019 11:07
web/index.html file - Flutter for Web
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="A simple implementation of Flutter for Web.">
<meta name="keywords" content="Flutter, Hummingbird">
<meta name="author" content="Ayush Shekhar">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hummingbird - Flutter For Web</title>
<script defer src="main.dart.js" type="application/javascript"></script>
@ayush221b
ayush221b / main.dart - Flutter for Web
Last active November 5, 2023 07:51
lib/main.dart file for Flutter for Web
import 'package:flutter_web/material.dart';
void main() => runApp(Hummingbird());
class Hummingbird extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Hummingbird - Flutter For Web',
debugShowCheckedModeBanner: false,
@ayush221b
ayush221b / main.dart
Created December 2, 2018 18:30
Implementing image_picker plugin in Flutter - basic example
import 'package:flutter/material.dart';
import 'dart:io';
import 'package:image_picker/image_picker.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@ayush221b
ayush221b / pubspec.yaml
Created December 2, 2018 18:07
Including image_picker as a dependency
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
image_picker:
@ayush221b
ayush221b / main.dart
Created December 2, 2018 13:58
Implementation of Image.asset() and Image.network() in Flutter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Image Examples',