Skip to content

Instantly share code, notes, and snippets.

View imtoori's full-sized avatar

Salvatore Giordano imtoori

View GitHub Profile
@imtoori
imtoori / ChannelPage.dart
Created July 5, 2022 13:56
How do I change the message input hint text based on which command I’m running?
class ChannelPage extends StatefulWidget {
/// Creates the page that shows the list of messages
const ChannelPage({
super.key,
});
@override
State<ChannelPage> createState() => _ChannelPageState();
}
MessageInput(
actionsLocation: ActionsLocation.right,
textEditingController: _textEditingController,
actions: [
Material(
clipBehavior: Clip.hardEdge,
type: MaterialType.transparency,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(32),
),

Build a weather Flutter package

The goal for this at-home assignment is to build a Flutter package that exports one or more widgets for showing a weather forecast.

Requirements

  • External libraries can be used, but they should not be related to any weather api
  • Handle all errors
  • You can use whatever weather api, but make sure that the widget accepts an api key as a parameter.
  • Do not publish the package to pub.dev, but upload it to a git repository so that it’s possible to use it as a git dependency.
@imtoori
imtoori / AppDelegate.swift
Created April 10, 2020 14:51
AppDelegate template to configure push notification and offline storage
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
let sharedDefaults = UserDefaults(suiteName: APPGROUP)
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
@imtoori
imtoori / NotificationService.swift
Created April 10, 2020 14:46
NotificationService template to configure push notification and offline storage
//
// NotificationService.swift
// Notifications
//
// Created by Salvatore Giordano on 25/03/2020.
// Copyright © 2020 The Chromium Authors. All rights reserved.
//
import UserNotifications
import StreamChatClient