Skip to content

Instantly share code, notes, and snippets.

View Andrious's full-sized avatar
🏠
Working from home

Andrious Solutions Andrious

🏠
Working from home
View GitHub Profile
@Andrious
Andrious / write_your_first_app.dart
Last active March 31, 2024 06:02
Write Your First App example using both the Marterial design or the Cupertino design.
import 'dart:io' show Platform;
import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:english_words/english_words.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
@Andrious
Andrious / android_alarm_manager.dart
Last active July 19, 2020 16:30
Example code used to demonstrate the use of the library file, alarm_manager.dart, working with the plugin, android_alarm_manager.
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// ignore_for_file: public_member_api_docs
import 'dart:math' show Random, pow;
import 'package:flutter/material.dart';
import 'alarm_manager.dart' show AlarmManager;
@Andrious
Andrious / alarm_manager.dart
Last active March 1, 2022 05:38
A Dart library file that works with the Flutter plugin, android_alarm_manager.
///
/// Copyright (C) 2020 Andrious Solutions
///
/// 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
@Andrious
Andrious / showCupertinoDatePicker.dart
Last active March 4, 2020 23:46
Cupertino Date Picker for use in a iOS Flutter app.
///
/// Copyright (C) 2019 Andrious Solutions Ltd.
/// adaptation from Miguel Ruivo https://github.com/miguelpruivo
///
/// This program is free software; you can redistribute it and/or
/// modify it under the terms of the GNU General Public License
/// as published by the Free Software Foundation; either version 3
/// of the License, or any later version.
///
/// You may obtain a copy of the License at
@Andrious
Andrious / auth_web.dart
Last active February 17, 2020 04:23
Package for Flutter Web Authentication
///
/// Copyright (C) 2018 Andrious Solutions
///
/// This program is free software; you can redistribute it and/or
/// modify it under the terms of the GNU General Public License
/// as published by the Free Software Foundation; either version 3
/// of the License, or any later version.
///
/// You may obtain a copy of the License at
///
@Andrious
Andrious / error_handler.dart
Last active September 20, 2022 21:51
An Flutter Error Handler Routine
import 'dart:async' show runZoned;
import 'dart:isolate' show Isolate, RawReceivePort;
import 'dart:ui' as ui
show
Paragraph,
ParagraphBuilder,
ParagraphConstraints,
ParagraphStyle,
TextStyle;
@Andrious
Andrious / counter_app_errors.dart
Last active February 3, 2020 17:59
Error Handling in Flutter using the starter app, Counter.
///
///
///
/// In file, pubspec.yaml:
///
// dependencies:
// flutter:
// sdk: flutter
//
// # The following adds the Cupertino Icons font to your application.
@Andrious
Andrious / Your_First_App.dart
Last active February 3, 2020 17:11
The 'Write Your First App' main.dart but with an intentional error in place.
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
import 'package:catcher/catcher_plugin.dart';
import 'error_handler.dart';
// void main() => runApp(MyApp());
//void main() => ErrorHandler.runApp(MyApp());
@Andrious
Andrious / flutter_search_example.dart
Created January 24, 2020 03:44
Search Bar Example
import 'package:flutter/material.dart';
/// https://pub.dev/packages/dio
import 'package:dio/dio.dart';
import 'appbar_search.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@Andrious
Andrious / appbar_search.dart
Last active January 24, 2020 06:53
Flutter AppBar Search class
import 'package:flutter/material.dart';
class AppBarSearch {
AppBarSearch({
@required this.state,
this.title,
this.hintText = "search...",
this.onPressed,
this.controller,
this.onSubmitted,