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 / schedule_notifications.dart
Last active April 11, 2024 05:56
Utility class using the plugin, flutter_local_notifications.dart.
import 'dart:async' show Future;
import 'dart:math' show Random;
import 'dart:typed_data' show Int64List;
import 'dart:ui' show Color;
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
//
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
@Andrious
Andrious / flutter_notifications_example.dart
Last active April 11, 2024 05:56
Example code for the library file, schedule_notifications.dart
import 'dart:async' show Future;
import 'dart:io' show File;
import 'dart:typed_data' show Int64List;
import 'dart:ui' show Color, FontWeight, Radius, VoidCallback;
import 'package:http/http.dart' as http;
@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 / inheritedwidget_state_mixin.dart
Last active March 15, 2024 01:22
Providing a built-in InheritedWidget to a State class
//
// Any State object 'with' this mixin has then a built-in InheritedWidget
//
//
import 'package:flutter/material.dart';
/// Supplies an InheritedWidget to a State class
///
mixin InheritedWidgetStateMixin<T extends StatefulWidget> on State<T> {
@Andrious
Andrious / three_counter_app_with_prints
Last active March 8, 2024 02:59
Two Screens with Three Counters and Print() functions highlight the StatefulWidgets' lifecycle
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
/// Highlights UI while debugging.
import 'package:flutter/rendering.dart' as debug;
void main() => runApp(MyApp());
///
class MyApp extends StatelessWidget {
@Andrious
Andrious / counter_app_with_prints.dart
Created March 1, 2024 02:11
The Counter App with a prints() functions highlighting the system & user events
//
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@Andrious
Andrious / statex_counter_app.dart
Created September 28, 2023 15:35
Counter Example App using StateX v. 4.7
import 'package:flutter/material.dart';
import 'package:state_extended/state_extended.dart';
/// Pass the boolean true take make this humble example app more efficient.
void main() => runApp(const StateXCounterPage(useInherited: false));
class StateXCounterPage extends StatefulWidget {
const StateXCounterPage({
super.key,
@Andrious
Andrious / statex_readme_example_app.dart
Last active August 20, 2023 03:01
Counter App Example using the Pub.dev package, state_extended
//
import 'package:flutter/material.dart';
import 'package:state_extended/state_extended.dart';
void main() => runApp(const MyApp(key: Key('MyApp')));
/// README.md example app
class MyApp extends StatefulWidget {
///
@Andrious
Andrious / statex_counter_app.dart
Created June 30, 2023 20:47
Counter example app demonstrating the StateX class
import 'package:fluttery_framework/view.dart';
import 'package:fluttery_framework/controller.dart';
void main() => runApp(MyApp());
class MyApp extends AppStatefulWidget {
MyApp({Key? key}) : super(key: key);
@override
@Andrious
Andrious / ListViewScrollController.dart
Last active March 9, 2023 15:29
ListView ScrollController Example
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp(
items: List<String>.generate(10000, (i) => "Item $i"),
));
}
class MyApp extends StatefulWidget {