All Projects β†’ fayaz07 β†’ ots

fayaz07 / ots

Licence: Apache-2.0 license
A widget that can show loaders, notifications, internet connectivity changes as Overlay.

Programming Languages

dart
5743 projects
HTML
75241 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to ots

React Loading Overlay
Loading overlays with fade, spinner, message support.
Stars: ✭ 218 (+990%)
Mutual labels:  loader, overlay
Vue Loading Overlay
Vue.js component for full screen loading indicator πŸŒ€
Stars: ✭ 784 (+3820%)
Mutual labels:  loader, overlay
busy-load
A flexible loading-mask jQuery-plugin
Stars: ✭ 76 (+280%)
Mutual labels:  loader, overlay
Is Loading
Simple library to show visual feedback when loading data or any action that would take time
Stars: ✭ 232 (+1060%)
Mutual labels:  loader, overlay
fastify-loader
The route loader for the cool kids!
Stars: ✭ 17 (-15%)
Mutual labels:  loader
Cleaner
An android app used to release memory by kill process using accessibility
Stars: ✭ 28 (+40%)
Mutual labels:  overlay
Emissary
Send notifications on different channels such as Slack, Telegram, Discord etc.
Stars: ✭ 33 (+65%)
Mutual labels:  notification
nautilus.js
[separated fork] Async JavaScript loader & dependency manager in ~600B [gziped]
Stars: ✭ 59 (+195%)
Mutual labels:  loader
react-skeleton-loader
A react helper for skeleton loaders
Stars: ✭ 61 (+205%)
Mutual labels:  loader
DroidNet
DroidNet is an Android Networking Library listening for network connection state and Internet connectivity with the assumption that active internet connection or not. Connecting to a network doesn’t necessarily mean that device has active internet connection
Stars: ✭ 63 (+215%)
Mutual labels:  internet-connectivity
github-release-notifier
Automatize tasks when a specific package got a new release - Github Release Notifier
Stars: ✭ 21 (+5%)
Mutual labels:  notification
keybase-chat-notifier
Simple desktop notifier for keybase chat
Stars: ✭ 18 (-10%)
Mutual labels:  notification
mosha-vue-toastify
A light weight and fun Vue 3 toast or notification or snack bar or however you wanna call it library.
Stars: ✭ 185 (+825%)
Mutual labels:  notification
prophetjs
Vanilla JS library to display toast messages.
Stars: ✭ 31 (+55%)
Mutual labels:  notification
XION-ChaseCam
This is a free-to-use HTML/javascript based overlay for roleplay streamers. Basically it mimics the overlay of the AXON bodycam, but since most folks play in 3rd person, it's a ChaseCam. I've included a logo, and the html file. The html file has the css, html, and javascript all in one file for ease of editing. Goto line 81 of the html file to c…
Stars: ✭ 27 (+35%)
Mutual labels:  overlay
Octavo
Verilog FPGA Parts Library. Old Octavo soft-CPU project.
Stars: ✭ 66 (+230%)
Mutual labels:  overlay
nuklear-glfw-vulkan
A nuklear adapter that does Vulkan rendering
Stars: ✭ 52 (+160%)
Mutual labels:  overlay
sw-loader
Yet another service worker loader
Stars: ✭ 19 (-5%)
Mutual labels:  loader
streamlabs-chat
Free customizable theme, template, custom coded CSS for Twitch, Streamlabs, Streamelemens chat box widget & overlay.
Stars: ✭ 59 (+195%)
Mutual labels:  overlay
Email-Graph-ZABBIX Python
No description or website provided.
Stars: ✭ 16 (-20%)
Mutual labels:  notification

over-the-screen

All Contributors

LinkedIn   Fork   Star   Watches

Get the library   Example

Buy Me A Coffee

An widget that can show loaders, notifications, internet connectivity changes as Overlay.

Screenshots

Demo

Internet connectivity changes Loader Notification

default_toast error_toast info_toast success_toast warning_toast

Installation

dependencies:
  flutter:
    sdk: flutter
  ...

  ots:
    git:
      url: git://github.com/fayaz07/ots.git

How to use

void main() => runApp(
      MyApp(),
    );

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return OTS(
      showNetworkUpdates: true,
      persistNoInternetNotification: false,

      /// pass your custom loader here
      loader: CircularProgressIndicator(
        valueColor: AlwaysStoppedAnimation<Color>(Colors.red),
      ),

      child: MaterialApp(
      title: 'OTS Test',
        home: Home(),
      ),
    );
  }
}

By default, loader is set to CircularProgressIndicator for Android and CupertinoActivityIndicator for iOS.

Showing and hiding a loader

showLoader(
  isModal: true,
);
/// Your network operation
hideLoader();

Note: isModal stops user from interacting with the screen

Showing and hiding a notification

showNotification(
  title: 'Test',
  message: 'Hello, this is notification',
  backgroundColor: Colors.green,
  autoDismissible: true,
  notificationDuration: 2500,
);

// use only if `autoDismissible: false`
hideNotification();

Showing toasts

Default toast
bakeToast("Hey toast!");
Info toast
bakeToast("Hey info!", type: ToastType.info);
Success toast
bakeToast("Hey success!", type: ToastType.success);
Error toast
bakeToast("Hey error!", type: ToastType.error);
Warning toast
bakeToast("Hey warning!", type: ToastType.warning);

Note: Notifications are automatically dismissed after the specified duration if autoDismissible is set to true.

Customize network updates messages and colors

You can customize text and color of network update messages to support multi-language applications. To do that, you must create a new class that extends NetworkStateMessenger

class CustomNetworkStateMessage extends NetworkStateMessenger {
  @override
  String message(NetworkState? networkState) {
    switch (networkState) {
      case NetworkState.Connected:
        return '#YOUR_CONNECTED_CUSTOM_MESSAGE#';
      case NetworkState.Disconnected:
        return '#YOUR_DISCONNECTED_CUSTOM_MESSAGE#';
      case NetworkState.Weak:
        return '#YOUR_WEAK_CUSTOM_MESSAGE#';
      case null:
    }
    return '#YOUR_UNKNOWN_CUSTOM_MESSAGE#';
  }

  @override
  Color color(NetworkState? networkState) {
    switch (networkState) {
      case NetworkState.Connected:
        return Colors.lightGreen;
      case NetworkState.Disconnected:
        return Colors.red;
      case NetworkState.Weak:
        return Colors.yellow;
      case null:
    }
    return Colors.orange;
  }
}

and then configure this custom messenger in the OTS constructor

return OTS(
  ...
  showNetworkUpdates: true,
  persistNoInternetNotification: true,
  networkStateMessenger: CustomNetworkStateMessage(),
  ...
)

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Mohammad Fayaz

πŸ’» πŸ–‹ πŸ“– πŸ’‘ πŸ€” 🚧

Alex Deas

πŸ’»

Pranathi Reddy

πŸ’»

Aster

πŸ’»

lscbot

πŸ’»

Antoni Remeseiro Alfonso

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].