{"id":13820771,"url":"https://github.com/boringdeveloper/FlutterSwitch","last_synced_at":"2025-05-16T10:32:49.219Z","repository":{"id":39862797,"uuid":"262562970","full_name":"boringdeveloper/FlutterSwitch","owner":"boringdeveloper","description":"A Custom Switch package created for Flutter.","archived":false,"fork":false,"pushed_at":"2024-03-16T12:00:22.000Z","size":179,"stargazers_count":78,"open_issues_count":22,"forks_count":66,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-07T14:42:55.694Z","etag":null,"topics":["custom-switch","dart","dart-package","flutter","flutter-package","flutter-widget","pub"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_switch","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boringdeveloper.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-09T12:10:18.000Z","updated_at":"2024-08-18T00:42:22.000Z","dependencies_parsed_at":"2024-01-15T15:12:59.771Z","dependency_job_id":"df8df909-ee6c-4042-b476-c5e4db66ebb1","html_url":"https://github.com/boringdeveloper/FlutterSwitch","commit_stats":{"total_commits":84,"total_committers":7,"mean_commits":12.0,"dds":0.5,"last_synced_commit":"001a3ce04c7a873682f058bf82c3b125d1526a6a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boringdeveloper%2FFlutterSwitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boringdeveloper%2FFlutterSwitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boringdeveloper%2FFlutterSwitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boringdeveloper%2FFlutterSwitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boringdeveloper","download_url":"https://codeload.github.com/boringdeveloper/FlutterSwitch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225423696,"owners_count":17472168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-switch","dart","dart-package","flutter","flutter-package","flutter-widget","pub"],"created_at":"2024-08-04T08:01:08.696Z","updated_at":"2024-11-19T20:31:13.387Z","avatar_url":"https://github.com/boringdeveloper.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# flutter_switch\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n[![pub package](https://img.shields.io/pub/v/flutter_switch.svg)](https://pub.dev/packages/flutter_switch) [![pub points](https://badges.bar/flutter_switch/pub%20points)](https://pub.dev/packages/flutter_switch/score) [![popularity](https://badges.bar/flutter_switch/popularity)](https://pub.dev/packages/flutter_switch/score) [![likes](https://badges.bar/flutter_switch/likes)](https://pub.dev/packages/flutter_switch/score) \u003ca href=\"https://github.com/boringdeveloper/FlutterSwitch/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/workflow/status/boringdeveloper/FlutterSwitch/Widget%20Test?label=build\"\u003e\u003c/a\u003e\n\nAn easy to implement custom switch created for Flutter. Give it a custom height and width, border for the switch and toggle, border radius, colors, toggle size, a choice to display an 'On' and 'Off' text and able to add an icon inside the toggle.\n\n [![GitHub followers](https://img.shields.io/github/followers/boringdeveloper.svg?style=social\u0026label=Follow)](https://github.com/boringdeveloper)  \u003ca href=\"https://www.linkedin.com/in/nichole-john-talban-romero/\"\u003e\u003cimg src=\"https://img.icons8.com/doodle/452/linkedin--v2.png\" width=\"20\"\u003e\u003c/a\u003e \u003ca href=\"https://twitter.com/nickrdev\"\u003e\u003cimg src=\"https://img.icons8.com/doodle/452/twitter--v1.png\" width=\"20\"\u003e\u003c/a\u003e\n\n## Demo\n\n ![flutter_switch](https://media0.giphy.com/media/zQ7AwA3SiAzqiFCW1o/giphy.gif) \n \n Video version: https://youtu.be/JqJnxjE6Efc\n\n\n## Use this package as a library\n\nAdd this to your package's `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  flutter_switch: ^0.3.1\n```\n\nYou can install packages from the command line with Flutter:\n```bash\n$ flutter pub get\n```\n\nImport in your project:\n```dart\nimport 'package:flutter_switch/flutter_switch.dart';\n```\n\n## Sample Usage\n```dart\nclass MyHomePage extends StatefulWidget {\n  @override\n  _MyHomePageState createState() =\u003e _MyHomePageState();\n}\n\nclass _MyHomePageState extends State\u003cMyHomePage\u003e {\n  bool status = false;\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: Text(\"FlutterSwitch Demo\"),\n      ),\n      body: Center(\n        child: Container(\n          child: FlutterSwitch(\n            width: 125.0,\n            height: 55.0,\n            valueFontSize: 25.0,\n            toggleSize: 45.0,\n            value: status,\n            borderRadius: 30.0,\n            padding: 8.0,\n            showOnOff: true,\n            onToggle: (val) {\n              setState(() {\n                status = val;\n              });\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n```\n\n## Want to Contribute?\n\nContributions to this project is very much welcome. Let's work together to maintain and improve the project\nSimply Fork the repository, Commit and Push your changes and create a new Pull Request.\n    \nDon't forget to try out the example project under the ./example folder.\n    \nAlso test your changes by running this command.\n```bash\n$ flutter test\n```\n\nIf you have some suggestions, you can reach me at romero.nicholejohn@gmail.com\n\n# License\n\n    BSD 3-Clause License\n\n    Copyright (c) 2020, Nichole John Romero\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions are met:\n\n        1. Redistributions of source code must retain the above copyright notice, this\n        list of conditions and the following disclaimer.\n\n        2. Redistributions in binary form must reproduce the above copyright notice,\n        this list of conditions and the following disclaimer in the documentation\n        and/or other materials provided with the distribution.\n\n        3. Neither the name of the copyright holder nor the names of its\n        contributors may be used to endorse or promote products derived from\n        this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/boringdeveloper\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/21273958?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eNickr\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/boringdeveloper/FlutterSwitch/commits?author=boringdeveloper\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/boringdeveloper/FlutterSwitch/commits?author=boringdeveloper\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-boringdeveloper\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/boringdeveloper/FlutterSwitch/commits?author=boringdeveloper\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/LucasED78\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/30601688?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLucas Eduardo\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/boringdeveloper/FlutterSwitch/commits?author=LucasED78\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/douglasramos\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/12133412?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDouglas Ramos\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/boringdeveloper/FlutterSwitch/commits?author=douglasramos\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/solid-daniyilyevtyushkin\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/69351065?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDaniyil Yevtyushkin\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/boringdeveloper/FlutterSwitch/commits?author=solid-daniyilyevtyushkin\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/boringdeveloper/FlutterSwitch/commits?author=solid-daniyilyevtyushkin\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Maksim-Nikolaev\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/45855362?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMaksim Nikolaev\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/boringdeveloper/FlutterSwitch/commits?author=Maksim-Nikolaev\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboringdeveloper%2FFlutterSwitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboringdeveloper%2FFlutterSwitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboringdeveloper%2FFlutterSwitch/lists"}