Daynightswitch - A day night switch widget for Flutter.

Overview

DayNightSwitch

A day night switch widget for Flutter.

Installation

Add to pubspec.yaml.

dependencies:
  day_night_switch:

Usage

To use plugin, just import package import 'package:day_night_switch/day_night_switch.dart';

Example

DayNightSwitch(
  value: val,
  moonImage: AssetImage('assets/moon.png'),
  sunImage: AssetImage('assets/sun.png'),
  sunColor: sunColor,
  moonColor: moonColor,
  dayColor: dayColor,
  nightColor: nightColor,
  onChanged: (value) {
    setState(() {
    val = value;
    });
  },
)

Connect

LICENCE

Copyright 2019 Divyanshu Bhargava

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
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You might also like...

📅 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

Jan 1, 2023

Flutter-job-app - Flutter UI Day 28 of 100 - Job App

Flutter-job-app - Flutter UI Day 28 of 100 - Job App

Flutter UI Day 28 of 100 - Job App Getting Started git clone https://github.com/

Sep 23, 2022

Flutter-Day-02 - A new Flutter project with Animation

Flutter-Day-02 - A new Flutter project with Animation

day02 A new Flutter project with Animation. Learn About Animation Page View Scre

Jan 10, 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

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

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

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

Nov 7, 2022

📝 one day list app created by flutter!

📝 one day list app created by flutter!

Language:简体中文|English Introduction Source of inspiration “One Day list ” is a small, simple and beautiful app, It can help you keep track of your dail

Jan 4, 2023

Flutter Facebook Redesign Application Design and Animation - day 19

Flutter Facebook Redesign Application Design and Animation - day 19

Flutter Facebook Redesign Application A part of #flutter100daysofcode. Let's create a beautiful and animated Facebook Application UI with Flutter. Wat

Dec 28, 2022
Comments
  • Trying to add the switch to a sidedrawer

    Trying to add the switch to a sidedrawer

    Screenshot from 2019-09-29 13-25-33

    But the size of the widget is always out pf proportion, tried wrapping the switch in a container which made it non-responsive Any ideas how to make this switch the size of a regular switch ?

    opened by justinjk007 3
  • Add onDrag to get position of the switch when draged

    Add onDrag to get position of the switch when draged

    Hi, divyanshub024 Thanks for this beautiful widget, I have used it in my project, and I added onDrag to get position of the switch to control other widgets when drag the switch. Hope this is also useful for other users.

    opened by stonega 0
Releases(v1.0.2)
Owner
Divyanshu Bhargava
Remote Flutter developer | Public Speaker 🎙️| Open source enthusiast | Blogger 📝| Exploring new Tech. 🇮🇳
Divyanshu Bhargava
A customizable toggle switch widget to add asset background images to the toggle switch.

A customizable toggle switch widget to add asset background images to the toggle switch. Features Use this package to give fancy background images to

null 3 Jul 26, 2022
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 beautiful switch made with Flutter

Crazy Switch Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is your first Flut

Pedro Massango 50 Nov 20, 2022
An easy to implement custom switch created for Flutter.

flutter_switch An easy to implement custom switch created for Flutter. Give it a custom height and width, border for the switch and toggle, border rad

Nickr 66 Dec 6, 2022
Beautiful Custom Switch package created with Flutter

custom_switch Beautiful Custom Switch package created with Flutter. The source code is 100% Dart, and everything resides in the /lib folder. Show some

Mohak Gupta 55 Sep 6, 2022
Flutter Xlive Switch

xlive_switch A Xlive Switcher plugin for Flutter Getting Started This plugin is based on Oleg Frolov's animation design which I found on Dribbble: htt

Châu Minh Phúc 15 Nov 4, 2022
Building a simple Flutter app * Switch Theme * for understanding the BLoC State Management including: Cubit Communications with StreamSubscription & Managing Route.

Building a simple Flutter app * Switch Theme * for understanding the BLoC State Management including: Cubit Communications with StreamSubscription & Managing Route.

TAD 1 Oct 3, 2022
An interesting and practical switch component.

FSwitch An interesting and practical switch component. Supports setting tips, slider decorations, shadows, and good interaction. Author:Newton(coorchi

Fliggy Mobile 81 Dec 13, 2022
Declaratively switch child widgets based on the current `Router` location.

Features Declaratively switch child widgets based on the current Router location. class SideBar extends StatelessWidget { Widget build(_){ re

gskinner team 7 Dec 12, 2022
A smart switch for you.

Features A smart switch for you.

Narendra Bhatt 2 Aug 26, 2022