A simple day / night switcher widget made in pure Dart.

Overview

DayNightSwitcher

Just a simple simple day / night switcher widget made in pure Dart. It allows you to quickly show a beautiful dark mode switcher widget to your users.

How to use ?

Using this plugin is pretty straightforward. You have two widgets : DayNightSwitcher and DayNightSwitcherIcon.

Here's a sample code for DayNightSwitcher :

DayNightSwitcher(
  isDarkModeEnabled: isDarkModeEnabled,
  onStateChanged: (isDarkModeEnabled) {
    setState(() {
      this.isDarkModeEnabled = isDarkModeEnabled;
    });
  },
),

The other one is very similar :

DayNightSwitcherIcon(
  isDarkModeEnabled: isDarkModeEnabled,
  onStateChanged: (isDarkModeEnabled) {
    setState(() {
      this.isDarkModeEnabled = isDarkModeEnabled;
    });
  },
),

Contributions

You have a lot of options to contribute to this project ! You can :

You might also like...

A pure Dart utility library that checks for an internet connection by opening a socket to a list of specified addresses, each with individual port and timeout. Defaults are provided for convenience.

data_connection_checker A pure Dart utility library that checks for an internet connection by opening a socket to a list of specified addresses, each

Nov 29, 2022

This project was writed with pure dart code,which means it's support both iOS and Android.

This project was writed with pure dart code,which means it's support both iOS and Android.

This project was writed with pure dart code,which means it's support both iOS and Android. Screenshot Todo show/hide animation Usage You can find the

Dec 24, 2022

DartMeltySoundFont - a SoundFont synthesizer (i.e. '.sf2' player) written in pure Dart

DartMeltySoundFont DartMeltySoundFont is a SoundFont synthesizer (i.e. '.sf2' player) written in pure Dart. It is a port of MeltySynth (C#, MIT Licens

Oct 29, 2022

A pure Dart package for working with RDF (resource description framework).

RDFLib A pure Dart package for working with RDF (resource description framework). Features Create triple instances (with data types) Create a graph to

Dec 15, 2022

SurrealDB client written in pure dart. auto reconnect, typed functions

SurrealDB Client For Dart & Flutter SurrealDB client for Dart and Flutter. Quick Start import 'package:surrealdb/surrealdb.dart'; void main(ListStri

Dec 18, 2022

Flutter Job List Application UI - Day 31

Flutter Job List Application UI - Day 31

Flutter Job List Application UI - Day 31 class Afgprogrammer extends Flutter100DaysOfCode { video() { return { "title": "Flutter Job List

Dec 27, 2022

Flutter Instagram Notification Page UI - Day 32

Flutter Instagram Notification Page UI - Day 32

Flutter Instagram Notification Page UI - Day 32 class Afgprogrammer extends Flutter100DaysOfCode { video() { return { "title": "Flutter In

Dec 17, 2022

Interview questions and answers for preparation, built in pure flutter also have CI implementation for learning.

Interview questions and answers for preparation, built in pure flutter also have CI implementation for learning.

toughest An app for interview preparation. Unique animations. More than 100 questions and answer. Good UI. Featured in many websites. For Vietnam user

Dec 27, 2022

Flutter Searchable ListView - Day 28

Flutter Searchable ListView - Day 28

Flutter Searchable ListView - Day 28 class Afgprogrammer extends Flutter100DaysOfCode { video() { return { "title": "Flutter Searchable Li

Dec 17, 2022
Comments
  • Add option to disabled switch conditionally

    Add option to disabled switch conditionally

    Add disable option in the switch to disable it based on a boolean value and also give a visual feedback that the switch is disabled for e.g. reduce opacity. Tried passing null to onStateChanged doesnt work. Have to Wrap it around IgnorePointer widget to acheive the functionality. But visual feedback is still not there.

    enhancement 
    opened by sgshivamgarg8 0
  • Double press does not work properly.

    Double press does not work properly.

    Describe the bug If you double click on the switch, it behaves abnormally. It goes into a loop.

    To Reproduce Steps to reproduce the behavior:

    1. Go to '...'
    2. Click on '....'
    3. Scroll down to '....'
    4. See an error

    Expected behavior A clear and concise description of what you expected to happen.

    Screenshots If applicable, add screenshots to help explain your problem.

    Desktop (please complete the following information):

    • OS: [All iOS version]
    • Browser [chrome]
    • Version [e.g. 22]

    Smartphone (please complete the following information):

    • Device: [tested on iPhone8]
    • OS: [e.g. iOS8.1]
    • Browser [e.g. stock browser, safari]
    • Version [day_night_switcher: ^0.2.0+1]

    Additional context Add any other context about the problem here.

    bug 
    opened by md-siam 0
Owner
Hugo Delaunay
💻 Yet Another Developer
Hugo Delaunay
Flutter application for latest news by top newspapers . And allow for share articles with friends. Now available in night mode. Also landscape mode is available

Breaking News Latest news for almost 55 country. Feature of saving article and search ariticles. Used API https://newsapi.org/ Note: if data is not ge

null 7 Oct 24, 2022
A simple set of terminal-based arcade games written in pure Dart.

dartcade A simple set of terminal-based arcade games written in pure Dart. Purpose I was developing some simple 2D UI libraries (such as package:gridd

Matan Lurey 7 Dec 7, 2022
A clock made in Flutter for smart clocks, with a cute snake that follows you all day long.

Snake Clock This is an original and fun clock face where a snake lives its day along yours. It’s my first ever Flutter app! I built it for the Flutter

GilDev 12 Nov 7, 2022
📅 Customizable flutter calendar widget including day and week views

?? Customizable, animated calendar widget including day, week, and month views. Navigation Animation Callbacks Changing the VisibleDateRange Available

Jonas Wanke 276 Jan 1, 2023
Petrus Nguyễn Thái Học 193 Dec 29, 2022
Pure Dart Client for Nakama Server 🌟🥰🤩

Nakama Flutter Client ?? ?? ?? ?? Nakama is an open-source scalable game server. This is a Flutter client for Nakama written in pure dart and supports

Oliver Brunsmann 57 Dec 6, 2022
Lightweight and blazing fast key-value database written in pure Dart.

Fast, Enjoyable & Secure NoSQL Database Hive is a lightweight and blazing fast key-value database written in pure Dart. Inspired by Bitcask. Documenta

HiveDB 3.4k Dec 30, 2022
Lightweight and blazing fast key-value database written in pure Dart.

Fast, Enjoyable & Secure NoSQL Database Hive is a lightweight and blazing fast key-value database written in pure Dart. Inspired by Bitcask. Documenta

HiveDB 3.4k Dec 30, 2022
Dart port of FormCoreJS: A minimal pure functional language based on self dependent types.

FormCore.js port to Dart. So far only the parser and typechecker have been ported i.e. the FormCore.js file in the original repo. (Original readme fro

Modestas Valauskas 2 Jan 28, 2022
Animated dialog box - A pure dart package for showing animated alert box.

animated_dialog_box A pure dart package for showing animated alert box. Getting Started https://github.com/Shubham-Narkhede/animated_dialog_box/blob/m

Shubham-Narkhede 10 Jul 24, 2022