├── digital_clock
├── ios
│ ├── Flutter
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── AppFrameworkInfo.plist
│ ├── Runner
│ │ ├── Runner-Bridging-Header.h
│ │ ├── Assets.xcassets
│ │ │ ├── LaunchImage.imageset
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ ├── README.md
│ │ │ │ └── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj
│ │ │ ├── Main.storyboard
│ │ │ └── LaunchScreen.storyboard
│ │ └── Info.plist
│ ├── Runner.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── Runner.xcodeproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── xcschemes
│ │ │ │ └── Runner.xcscheme
│ │ └── project.pbxproj
│ └── .gitignore
├── android
│ ├── gradle.properties
│ ├── .gitignore
│ ├── app
│ │ ├── src
│ │ │ ├── main
│ │ │ │ ├── res
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── values
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ └── drawable
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ ├── kotlin
│ │ │ │ │ └── com
│ │ │ │ │ │ └── example
│ │ │ │ │ │ └── digital_clock
│ │ │ │ │ │ └── MainActivity.kt
│ │ │ │ └── AndroidManifest.xml
│ │ │ ├── debug
│ │ │ │ └── AndroidManifest.xml
│ │ │ └── profile
│ │ │ │ └── AndroidManifest.xml
│ │ └── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── settings.gradle
│ └── build.gradle
├── third_party
│ ├── PressStart2P-Regular.ttf
│ └── LICENSE
├── .metadata
├── pubspec.yaml
├── lib
│ ├── globals.dart
│ ├── custom_randomizer.dart
│ ├── main.dart
│ ├── digit_checker.dart
│ ├── node.dart
│ └── digital_clock.dart
├── .gitignore
└── pubspec.lock
├── BlackAndWhite.png
├── flutter_clock_helper
├── CHANGELOG.md
├── customizer.png
├── .metadata
├── pubspec.yaml
├── README.md
├── .packages
├── pubspec.lock
└── lib
│ ├── model.dart
│ └── customizer.dart
├── README.md
└── LICENSE
/digital_clock/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/digital_clock/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/BlackAndWhite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/BlackAndWhite.png
--------------------------------------------------------------------------------
/flutter_clock_helper/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [0.0.1] - TODO: Add release date.
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/flutter_clock_helper/customizer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/flutter_clock_helper/customizer.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter Clock
2 |
3 | My entry to the [flutter.dev/clock](https://flutter.dev/clock) challenge
4 |
5 | 
--------------------------------------------------------------------------------
/digital_clock/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/digital_clock/third_party/PressStart2P-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/third_party/PressStart2P-Regular.ttf
--------------------------------------------------------------------------------
/digital_clock/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/digital_clock/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/digital_clock/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/digital_clock/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/digital_clock/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/digital_clock/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Fabian-Stein/flutterClock/HEAD/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/digital_clock/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/digital_clock/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/digital_clock/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: ade8dfac3dfb4d2ea04b45ff589fd073d8fc4274
8 | channel: master
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/flutter_clock_helper/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 9bd02a1787bd264fde13a445a900ca28d08e3cef
8 | channel: master
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/digital_clock/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/digital_clock/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/digital_clock/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter_clock_helper/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_clock_helper
2 | description: Helper classes for Flutter Clock contest.
3 |
4 | version: 1.0.0+1
5 |
6 | environment:
7 | sdk: ">=2.2.2 <3.0.0"
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 | intl: "^0.16.0"
13 |
14 | cupertino_icons: ^0.1.2
15 |
16 | dev_dependencies:
17 | flutter_test:
18 | sdk: flutter
19 |
20 | flutter:
21 | uses-material-design: true
22 |
--------------------------------------------------------------------------------
/digital_clock/android/app/src/main/kotlin/com/example/digital_clock/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.digital_clock
2 |
3 | import android.os.Bundle
4 | import io.flutter.app.FlutterActivity
5 | import io.flutter.plugins.GeneratedPluginRegistrant
6 |
7 | class MainActivity: FlutterActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | GeneratedPluginRegistrant.registerWith(this)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/digital_clock/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/digital_clock/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: digital_clock
2 | description: Digital clock.
3 | version: 1.0.0+1
4 |
5 | environment:
6 | sdk: ">=2.1.0 <3.0.0"
7 |
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 | flutter_clock_helper:
12 | path: ../flutter_clock_helper
13 | cupertino_icons: ^0.1.2
14 |
15 | dev_dependencies:
16 | flutter_test:
17 | sdk: flutter
18 |
19 | flutter:
20 | uses-material-design: true
21 | fonts:
22 | - family: PressStart2P
23 | fonts:
24 | - asset: third_party/PressStart2P-Regular.ttf
25 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/digital_clock/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/digital_clock/lib/globals.dart:
--------------------------------------------------------------------------------
1 | import 'package:digital_clock/custom_randomizer.dart';
2 | import 'digit_checker.dart';
3 |
4 | double aspectRatio = 5 / 3;
5 |
6 | CustomRandomizer randomizer = CustomRandomizer();
7 | DigitChecker digitChecker = DigitChecker();
8 |
9 | double maxDistanceBetweenNodes = 0.05;
10 | // the number of columns and rows, with which the screen is partitioned
11 | // we do this as an optimization, the reason is explained in the paint method in digital clock
12 | int columns = (aspectRatio / maxDistanceBetweenNodes).ceil();
13 | int rows = (1.0 / maxDistanceBetweenNodes).ceil();
14 |
15 | int quadrants() {
16 | return rows * columns;
17 | }
18 |
--------------------------------------------------------------------------------
/digital_clock/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/digital_clock/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/digital_clock/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Web related
33 | lib/generated_plugin_registrant.dart
34 |
35 | # Exceptions to above rules.
36 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
37 |
--------------------------------------------------------------------------------
/digital_clock/lib/custom_randomizer.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | /// a custom randomizer, which offers convenience functions
4 | class CustomRandomizer {
5 | Random rng = Random();
6 |
7 | /// returns a random floating point value between [low] and [high]
8 | double doubleInRange(double low, high) {
9 | assert(high > low);
10 | return rng.nextDouble() * (high - low) + low;
11 | }
12 |
13 | /// returns a random floating point value between 0.0 and [high]
14 | double doubleUpTo(double high) {
15 | return rng.nextDouble() * high;
16 | }
17 |
18 | /// returns a random point with a x value between [xLow] and [xHigh] and a y value between [yLow] and [yHigh]
19 | Point point(double xLow, xHigh, yLow, yHigh) {
20 | return Point(
21 | this.doubleInRange(xLow, xHigh), this.doubleInRange(yLow, yHigh));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/digital_clock/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/flutter_clock_helper/README.md:
--------------------------------------------------------------------------------
1 | # Flutter Clock Helper
2 |
3 | This package provides scaffolding code for the clock in the Flutter Clock contest.
4 |
5 | Contestants: Do not edit this code.
6 |
7 |
8 | ## Model
9 | Provides data that can change in the clock. Look in model.dart for more details.
10 |
11 | * Time format (12- or 24-hour)
12 | * Location
13 | * Temperature
14 | * Temperature high
15 | * Temperature low
16 | * Temperature unit
17 | * Weather unit
18 |
19 |
20 | ## Clock Customizer
21 | Provides customizations for your clock (based on the model).
22 | You can change the behavior of your clock based on these customizations.
23 |
24 |
25 |
26 | To use inside your app's `main.dart`:
27 |
28 | ```
29 | runApp(ClockCustomizer((ClockModel model) => AnalogClock(model)));
30 | ```
31 |
32 | For more information, see the code inside [lib/](lib).
33 | For a full example, see the [Analog Clock](../analog_clock) or [Digital Clock](../digital_clock) in this GitHub repo.
34 |
--------------------------------------------------------------------------------
/digital_clock/lib/main.dart:
--------------------------------------------------------------------------------
1 | // Use of this source code is governed by a BSD-style license that can be
2 | // found in the LICENSE file.
3 |
4 | import 'dart:io';
5 |
6 | import 'package:flutter_clock_helper/customizer.dart';
7 | import 'package:flutter_clock_helper/model.dart';
8 | import 'package:flutter/foundation.dart';
9 | import 'package:flutter/material.dart';
10 |
11 | import 'digital_clock.dart';
12 |
13 | void main() {
14 | // A temporary measure until Platform supports web and TargetPlatform supports
15 | // macOS.
16 | if (!kIsWeb && Platform.isMacOS) {
17 | // TODO(gspencergoog): Update this when TargetPlatform includes macOS.
18 | // https://github.com/flutter/flutter/issues/31366
19 | // See https://github.com/flutter/flutter/wiki/Desktop-shells#target-platform-override.
20 | debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia;
21 | }
22 |
23 |
24 | // This creates a clock that enables you to customize it.
25 | //
26 | // The [ClockCustomizer] takes in a [ClockBuilder] that consists of:
27 | // - A clock widget (in this case, [DigitalClock])
28 | // - A model (provided to you by [ClockModel])
29 | // For more information, see the flutter_clock_helper package.
30 | //
31 | // Your job is to edit [DigitalClock], or replace it with your
32 | // own clock widget. (Look in digital_clock.dart for more details!)
33 | runApp(ClockCustomizer((ClockModel model) => DigitalClock(model)));
34 | }
35 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2019 The Chromium Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without modification,
4 | are permitted provided that the following conditions are met:
5 |
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above
9 | copyright notice, this list of conditions and the following
10 | disclaimer in the documentation and/or other materials provided
11 | with the distribution.
12 | * Neither the name of Google Inc. nor the names of its
13 | contributors may be used to endorse or promote products derived
14 | from this software without specific prior written permission.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | digital_clock
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/digital_clock/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
23 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/digital_clock/lib/digit_checker.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | /// The [DigitChecker] stores the information of the 10 digits and can determine if a point intersects with a given digit
4 | class DigitChecker {
5 | // ten digits with 15 "pixels" each
6 | // we "paint" the digits by defining the 1 as filled and 0 as unfilled
7 | List digits = [
8 | 1, 1, 1, // 0
9 | 1, 0, 1,
10 | 1, 0, 1,
11 | 1, 0, 1,
12 | 1, 1, 1,
13 |
14 | 0, 1, 1, // 1
15 | 0, 0, 1,
16 | 0, 0, 1,
17 | 0, 0, 1,
18 | 0, 0, 1,
19 |
20 | 1, 1, 1, // 2
21 | 0, 0, 1,
22 | 1, 1, 1,
23 | 1, 0, 0,
24 | 1, 1, 1,
25 |
26 | 1, 1, 1, // 3
27 | 0, 0, 1,
28 | 0, 1, 1,
29 | 0, 0, 1,
30 | 1, 1, 1,
31 |
32 | 1, 0, 1, // 4
33 | 1, 0, 1,
34 | 1, 1, 1,
35 | 0, 0, 1,
36 | 0, 0, 1,
37 |
38 | 1, 1, 1, // 5
39 | 1, 0, 0,
40 | 1, 1, 1,
41 | 0, 0, 1,
42 | 1, 1, 1,
43 |
44 | 1, 1, 1, // 6
45 | 1, 0, 0,
46 | 1, 1, 1,
47 | 1, 0, 1,
48 | 1, 1, 1,
49 |
50 | 1, 1, 1, // 7
51 | 0, 0, 1,
52 | 0, 0, 1,
53 | 0, 0, 1,
54 | 0, 0, 1,
55 |
56 | 1, 1, 1, // 8
57 | 1, 0, 1,
58 | 1, 1, 1,
59 | 1, 0, 1,
60 | 1, 1, 1,
61 |
62 | 1, 1, 1, // 9
63 | 1, 0, 1,
64 | 1, 1, 1,
65 | 0, 0, 1,
66 | 1, 1, 1
67 | ];
68 |
69 | /// is the [point] inside the [digit] stretched over the [rect]
70 | bool isIn(int digit, Point point, Rectangle rect) {
71 | if (rect.containsPoint(point)) {
72 | double x = point.x - rect.topLeft.x;
73 | double y = point.y - rect.topLeft.y;
74 |
75 | int column = (3 * x / rect.width).floor();
76 | int row = (5 * y / rect.height).floor();
77 |
78 | int offset = digit * 15;
79 |
80 | int index = offset + column + row * 3;
81 |
82 | if (digits[index] == 1) {
83 | return true;
84 | }
85 | }
86 | return false;
87 | }
88 |
89 | /// is the [point] outside the [digit] stretched over the [rect]
90 | bool isOut(int digit, Point point, Rectangle rect) {
91 | return !isIn(digit, point, rect);
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/flutter_clock_helper/.packages:
--------------------------------------------------------------------------------
1 | # Generated by pub on 2019-12-05 11:57:44.647192.
2 | async:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.3.0/lib/
3 | boolean_selector:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.5/lib/
4 | charcode:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/
5 | collection:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib/
6 | cupertino_icons:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/
7 | flutter:file:///Users/fabianstein/flutter/packages/flutter/lib/
8 | flutter_test:file:///Users/fabianstein/flutter/packages/flutter_test/lib/
9 | intl:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.0/lib/
10 | matcher:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.5/lib/
11 | meta:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.7/lib/
12 | path:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.6.4/lib/
13 | pedantic:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/pedantic-1.8.0+1/lib/
14 | quiver:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.5/lib/
15 | sky_engine:file:///Users/fabianstein/flutter/bin/cache/pkg/sky_engine/lib/
16 | source_span:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.5.5/lib/
17 | stack_trace:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/
18 | stream_channel:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0/lib/
19 | string_scanner:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5/lib/
20 | term_glyph:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/
21 | test_api:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.5/lib/
22 | typed_data:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/
23 | vector_math:file:///Users/fabianstein/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib/
24 | flutter_clock_helper:lib/
25 |
--------------------------------------------------------------------------------
/digital_clock/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.digital_clock"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'androidx.test:runner:1.1.1'
66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
67 | }
68 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/digital_clock/lib/node.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 | import 'globals.dart';
3 |
4 | /// [Node] represents one of the moving elements in the net
5 | /// [coordinate] of the node
6 | /// the coordinate system we use has its origin in the middle of the screen for convinience
7 | /// the maximal y range is -0.5 to 0.5
8 | /// the maximal x range is -0.5 * aspectRatio to 0.5 * aspectRatio
9 | /// [velocity]: how does the node move every timestep
10 | class Node {
11 | Point coordinate;
12 | Point velocity = randomizer.point(-0.5, 0.5, -0.5, 0.5);
13 | int quadrant = 0;
14 | int index = 0;
15 | bool isStatic;
16 |
17 | /// returns a node with randomized values
18 | /// if [isStatic] is true, then the node does not move and its coordinate is more more likely to be arround the (0,0)
19 | Node(this.isStatic) {
20 | if (!isStatic) {
21 | coordinate =
22 | randomizer.point(-aspectRatio / 2, aspectRatio / 2, -0.5, 0.5);
23 | // velocity = randomizer.doubleInRange(0.2, 1.0);
24 | velocity = randomizer.point(-0.5, 0.5, -0.5, 0.5);
25 | } else {
26 | Point randomPoint = randomizer.point(-aspectRatio / 2 + 1.5 / 12.0,
27 | aspectRatio / 2 - 1.5 / 12.0, -0.5 + 3.0 / 12.0, 0.5 - 3.0 / 12.0);
28 | coordinate = randomPoint;
29 | //velocity = 0.0;
30 | velocity = Point(0, 0);
31 | }
32 | }
33 |
34 | // update the position of the node and compute in which quadrant it is located
35 | void update() {
36 | if (!isStatic) {
37 | //update position
38 | coordinate += velocity * 0.004;
39 |
40 | double maxX = aspectRatio / 2, maxY = 0.5;
41 |
42 | // if the point has reached a wall, then we move it to the opposite wall
43 | // i think this is called a periodic boundary condition
44 | if (coordinate.x > maxX || coordinate.x < -maxX) {
45 | coordinate = Point(-coordinate.x, coordinate.y);
46 | }
47 | if (coordinate.y > maxY || coordinate.y < -maxY) {
48 | coordinate = Point(coordinate.x, -coordinate.y);
49 | }
50 |
51 | //compute quadrant of node
52 | int xQuadrant =
53 | (columns * (coordinate.x + aspectRatio / 2) / aspectRatio).floor();
54 | int yQuadrant = (rows * (coordinate.y + 0.5)).floor();
55 | quadrant = max(0, min(columns * yQuadrant + xQuadrant, quadrants() - 1));
56 | }
57 | }
58 |
59 | /// gives back the result of the right Outside/Inside check, according to the [checkInside] flag
60 | bool checkCoordinate(int hour, minute, bool checkInside) {
61 | if (checkInside) {
62 | return _isInsideOfNumbers(hour, minute);
63 | } else {
64 | return _isOutsideOfNumbers(hour, minute);
65 | }
66 | }
67 |
68 | /// check if the coordinate of the node is in one of the four digits, which represent [hour] and [minute]
69 | bool _isOutsideOfNumbers(int hour, minute) {
70 | int digit1 = hour ~/ 10;
71 | int digit2 = hour % 10;
72 |
73 | int digit3 = minute ~/ 10;
74 | int digit4 = minute % 10;
75 |
76 | double width = 3 * aspectRatio / 20;
77 | double height = 5 * width / 3;
78 | double distance = width / 3;
79 |
80 | Rectangle rect1 =
81 | Rectangle(-2 * (width + distance), -height / 2, width, height);
82 | Rectangle rect2 =
83 | Rectangle(-1 * (width + distance), -height / 2, width, height);
84 | Rectangle rect3 = Rectangle(distance, -height / 2, width, height);
85 | Rectangle rect4 =
86 | Rectangle(2 * distance + width, -height / 2, width, height);
87 |
88 | return digitChecker.isOut(digit1, coordinate, rect1) &&
89 | digitChecker.isOut(digit2, coordinate, rect2) &&
90 | digitChecker.isOut(digit3, coordinate, rect3) &&
91 | digitChecker.isOut(digit4, coordinate, rect4);
92 | }
93 |
94 | // the inverse of the function above
95 | bool _isInsideOfNumbers(int hour, minute) {
96 | return !_isOutsideOfNumbers(hour, minute);
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/flutter_clock_helper/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.3.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.5"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | cupertino_icons:
33 | dependency: "direct main"
34 | description:
35 | name: cupertino_icons
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "0.1.3"
39 | flutter:
40 | dependency: "direct main"
41 | description: flutter
42 | source: sdk
43 | version: "0.0.0"
44 | flutter_test:
45 | dependency: "direct dev"
46 | description: flutter
47 | source: sdk
48 | version: "0.0.0"
49 | intl:
50 | dependency: "direct main"
51 | description:
52 | name: intl
53 | url: "https://pub.dartlang.org"
54 | source: hosted
55 | version: "0.16.0"
56 | matcher:
57 | dependency: transitive
58 | description:
59 | name: matcher
60 | url: "https://pub.dartlang.org"
61 | source: hosted
62 | version: "0.12.5"
63 | meta:
64 | dependency: transitive
65 | description:
66 | name: meta
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "1.1.7"
70 | path:
71 | dependency: transitive
72 | description:
73 | name: path
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "1.6.4"
77 | pedantic:
78 | dependency: transitive
79 | description:
80 | name: pedantic
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "1.8.0+1"
84 | quiver:
85 | dependency: transitive
86 | description:
87 | name: quiver
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "2.0.5"
91 | sky_engine:
92 | dependency: transitive
93 | description: flutter
94 | source: sdk
95 | version: "0.0.99"
96 | source_span:
97 | dependency: transitive
98 | description:
99 | name: source_span
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "1.5.5"
103 | stack_trace:
104 | dependency: transitive
105 | description:
106 | name: stack_trace
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "1.9.3"
110 | stream_channel:
111 | dependency: transitive
112 | description:
113 | name: stream_channel
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "2.0.0"
117 | string_scanner:
118 | dependency: transitive
119 | description:
120 | name: string_scanner
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.0.5"
124 | term_glyph:
125 | dependency: transitive
126 | description:
127 | name: term_glyph
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.1.0"
131 | test_api:
132 | dependency: transitive
133 | description:
134 | name: test_api
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "0.2.5"
138 | typed_data:
139 | dependency: transitive
140 | description:
141 | name: typed_data
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.1.6"
145 | vector_math:
146 | dependency: transitive
147 | description:
148 | name: vector_math
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "2.0.8"
152 | sdks:
153 | dart: ">=2.2.2 <3.0.0"
154 |
--------------------------------------------------------------------------------
/digital_clock/third_party/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2012 The Press Start 2P Project Authors (cody@zone38.net), with Reserved Font Name "Press Start 2P".
2 |
3 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
4 | This license is copied below, and is also available with a FAQ at:
5 | http://scripts.sil.org/OFL
6 |
7 |
8 | -----------------------------------------------------------
9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10 | -----------------------------------------------------------
11 |
12 | PREAMBLE
13 | The goals of the Open Font License (OFL) are to stimulate worldwide
14 | development of collaborative font projects, to support the font creation
15 | efforts of academic and linguistic communities, and to provide a free and
16 | open framework in which fonts may be shared and improved in partnership
17 | with others.
18 |
19 | The OFL allows the licensed fonts to be used, studied, modified and
20 | redistributed freely as long as they are not sold by themselves. The
21 | fonts, including any derivative works, can be bundled, embedded,
22 | redistributed and/or sold with any software provided that any reserved
23 | names are not used by derivative works. The fonts and derivatives,
24 | however, cannot be released under any other type of license. The
25 | requirement for fonts to remain under this license does not apply
26 | to any document created using the fonts or their derivatives.
27 |
28 | DEFINITIONS
29 | "Font Software" refers to the set of files released by the Copyright
30 | Holder(s) under this license and clearly marked as such. This may
31 | include source files, build scripts and documentation.
32 |
33 | "Reserved Font Name" refers to any names specified as such after the
34 | copyright statement(s).
35 |
36 | "Original Version" refers to the collection of Font Software components as
37 | distributed by the Copyright Holder(s).
38 |
39 | "Modified Version" refers to any derivative made by adding to, deleting,
40 | or substituting -- in part or in whole -- any of the components of the
41 | Original Version, by changing formats or by porting the Font Software to a
42 | new environment.
43 |
44 | "Author" refers to any designer, engineer, programmer, technical
45 | writer or other person who contributed to the Font Software.
46 |
47 | PERMISSION & CONDITIONS
48 | Permission is hereby granted, free of charge, to any person obtaining
49 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
50 | redistribute, and sell modified and unmodified copies of the Font
51 | Software, subject to the following conditions:
52 |
53 | 1) Neither the Font Software nor any of its individual components,
54 | in Original or Modified Versions, may be sold by itself.
55 |
56 | 2) Original or Modified Versions of the Font Software may be bundled,
57 | redistributed and/or sold with any software, provided that each copy
58 | contains the above copyright notice and this license. These can be
59 | included either as stand-alone text files, human-readable headers or
60 | in the appropriate machine-readable metadata fields within text or
61 | binary files as long as those fields can be easily viewed by the user.
62 |
63 | 3) No Modified Version of the Font Software may use the Reserved Font
64 | Name(s) unless explicit written permission is granted by the corresponding
65 | Copyright Holder. This restriction only applies to the primary font name as
66 | presented to the users.
67 |
68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69 | Software shall not be used to promote, endorse or advertise any
70 | Modified Version, except to acknowledge the contribution(s) of the
71 | Copyright Holder(s) and the Author(s) or with their explicit written
72 | permission.
73 |
74 | 5) The Font Software, modified or unmodified, in part or in whole,
75 | must be distributed entirely under this license, and must not be
76 | distributed under any other license. The requirement for fonts to
77 | remain under this license does not apply to any document created
78 | using the Font Software.
79 |
80 | TERMINATION
81 | This license becomes null and void if any of the above conditions are
82 | not met.
83 |
84 | DISCLAIMER
85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93 | OTHER DEALINGS IN THE FONT SOFTWARE.
94 |
--------------------------------------------------------------------------------
/flutter_clock_helper/lib/model.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/foundation.dart';
6 | import 'package:flutter/material.dart';
7 |
8 | /// This is the model that contains the customization options for the clock.
9 | ///
10 | /// It is a [ChangeNotifier], so use [ChangeNotifier.addListener] to listen to
11 | /// changes to the model. Be sure to call [ChangeNotifier.removeListener] in
12 | /// your `dispose` method.
13 | ///
14 | /// Contestants: Do not edit this.
15 | class ClockModel extends ChangeNotifier {
16 | get is24HourFormat => _is24HourFormat;
17 | bool _is24HourFormat = true;
18 | set is24HourFormat(bool is24HourFormat) {
19 | if (_is24HourFormat != is24HourFormat) {
20 | _is24HourFormat = is24HourFormat;
21 | notifyListeners();
22 | }
23 | }
24 |
25 | /// Current location String, for example 'Mountain View, CA'.
26 | get location => _location;
27 | String _location = 'Mountain View, CA';
28 | set location(String location) {
29 | if (location != _location) {
30 | _location = location;
31 | notifyListeners();
32 | }
33 | }
34 |
35 | /// Current temperature string, for example '22°C'.
36 | get temperature => _convertFromCelsius(_temperature);
37 | // Stored in degrees celsius, and converted based on the current unit setting
38 | num _temperature = 22.0;
39 | set temperature(num temperature) {
40 | temperature = _convertToCelsius(temperature);
41 | if (temperature != _temperature) {
42 | _temperature = temperature;
43 | _low = _temperature - 3.0;
44 | _high = _temperature + 4.0;
45 | notifyListeners();
46 | }
47 | }
48 |
49 | /// Daily high temperature, for example '26'.
50 | get high => _convertFromCelsius(_high);
51 | // Stored in degrees celsius, and converted based on the current unit setting
52 | num _high = 26.0;
53 | set high(num high) {
54 | high = _convertToCelsius(high);
55 | if (high != _high) {
56 | _high = high;
57 | notifyListeners();
58 | }
59 | }
60 |
61 | /// Daily low temperature, for example '19'.
62 | get low => _convertFromCelsius(_low);
63 | num _low = 19.0;
64 | set low(num low) {
65 | low = _convertToCelsius(low);
66 | if (low != _low) {
67 | _low = low;
68 | notifyListeners();
69 | }
70 | }
71 |
72 | /// Weather condition text for the current weather, for example 'cloudy'.
73 | WeatherCondition get weatherCondition => _weatherCondition;
74 | WeatherCondition _weatherCondition = WeatherCondition.sunny;
75 | set weatherCondition(WeatherCondition weatherCondition) {
76 | if (weatherCondition != _weatherCondition) {
77 | _weatherCondition = weatherCondition;
78 | notifyListeners();
79 | }
80 | }
81 |
82 | /// [WeatherCondition] value without the enum type.
83 | String get weatherString => enumToString(weatherCondition);
84 |
85 | /// Temperature unit, for example 'celsius'.
86 | TemperatureUnit get unit => _unit;
87 | TemperatureUnit _unit = TemperatureUnit.celsius;
88 | set unit(TemperatureUnit unit) {
89 | if (unit != _unit) {
90 | _unit = unit;
91 | notifyListeners();
92 | }
93 | }
94 |
95 | /// Temperature with unit of measurement.
96 | String get temperatureString {
97 | return '${temperature.toStringAsFixed(1)}$unitString';
98 | }
99 |
100 | /// Temperature high with unit of measurement.
101 | String get highString {
102 | return '${high.toStringAsFixed(1)}$unitString';
103 | }
104 |
105 | /// Temperature low with unit of measurement.
106 | String get lowString {
107 | return '${low.toStringAsFixed(1)}$unitString';
108 | }
109 |
110 | /// Temperature unit of measurement with degrees.
111 | String get unitString {
112 | switch (unit) {
113 | case TemperatureUnit.fahrenheit:
114 | return '°F';
115 | case TemperatureUnit.celsius:
116 | default:
117 | return '°C';
118 | }
119 | }
120 |
121 | num _convertFromCelsius(num degreesCelsius) {
122 | switch (unit) {
123 | case TemperatureUnit.fahrenheit:
124 | return 32.0 + degreesCelsius * 9.0 / 5.0;
125 | case TemperatureUnit.celsius:
126 | default:
127 | return degreesCelsius;
128 | break;
129 | }
130 | }
131 |
132 | num _convertToCelsius(num degrees) {
133 | switch (unit) {
134 | case TemperatureUnit.fahrenheit:
135 | return (degrees - 32.0) * 5.0 / 9.0;
136 | case TemperatureUnit.celsius:
137 | default:
138 | return degrees;
139 | break;
140 | }
141 | }
142 | }
143 |
144 | /// Weather condition in English.
145 | enum WeatherCondition {
146 | cloudy,
147 | foggy,
148 | rainy,
149 | snowy,
150 | sunny,
151 | thunderstorm,
152 | windy,
153 | }
154 |
155 | /// Temperature unit of measurement.
156 | enum TemperatureUnit {
157 | celsius,
158 | fahrenheit,
159 | }
160 |
161 | /// Removes the enum type and returns the value as a String.
162 | String enumToString(Object e) => e.toString().split('.').last;
163 |
--------------------------------------------------------------------------------
/digital_clock/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | archive:
5 | dependency: transitive
6 | description:
7 | name: archive
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.0.11"
11 | args:
12 | dependency: transitive
13 | description:
14 | name: args
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.5.2"
18 | async:
19 | dependency: transitive
20 | description:
21 | name: async
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.4.0"
25 | boolean_selector:
26 | dependency: transitive
27 | description:
28 | name: boolean_selector
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.0.5"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.2"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.14.11"
46 | convert:
47 | dependency: transitive
48 | description:
49 | name: convert
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "2.1.1"
53 | crypto:
54 | dependency: transitive
55 | description:
56 | name: crypto
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "2.1.3"
60 | cupertino_icons:
61 | dependency: "direct main"
62 | description:
63 | name: cupertino_icons
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "0.1.2"
67 | flutter:
68 | dependency: "direct main"
69 | description: flutter
70 | source: sdk
71 | version: "0.0.0"
72 | flutter_clock_helper:
73 | dependency: "direct main"
74 | description:
75 | path: "../flutter_clock_helper"
76 | relative: true
77 | source: path
78 | version: "1.0.0+1"
79 | flutter_test:
80 | dependency: "direct dev"
81 | description: flutter
82 | source: sdk
83 | version: "0.0.0"
84 | image:
85 | dependency: transitive
86 | description:
87 | name: image
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "2.1.4"
91 | intl:
92 | dependency: transitive
93 | description:
94 | name: intl
95 | url: "https://pub.dartlang.org"
96 | source: hosted
97 | version: "0.16.0"
98 | matcher:
99 | dependency: transitive
100 | description:
101 | name: matcher
102 | url: "https://pub.dartlang.org"
103 | source: hosted
104 | version: "0.12.6"
105 | meta:
106 | dependency: transitive
107 | description:
108 | name: meta
109 | url: "https://pub.dartlang.org"
110 | source: hosted
111 | version: "1.1.8"
112 | path:
113 | dependency: transitive
114 | description:
115 | name: path
116 | url: "https://pub.dartlang.org"
117 | source: hosted
118 | version: "1.6.4"
119 | pedantic:
120 | dependency: transitive
121 | description:
122 | name: pedantic
123 | url: "https://pub.dartlang.org"
124 | source: hosted
125 | version: "1.8.0+1"
126 | petitparser:
127 | dependency: transitive
128 | description:
129 | name: petitparser
130 | url: "https://pub.dartlang.org"
131 | source: hosted
132 | version: "2.4.0"
133 | quiver:
134 | dependency: transitive
135 | description:
136 | name: quiver
137 | url: "https://pub.dartlang.org"
138 | source: hosted
139 | version: "2.0.5"
140 | sky_engine:
141 | dependency: transitive
142 | description: flutter
143 | source: sdk
144 | version: "0.0.99"
145 | source_span:
146 | dependency: transitive
147 | description:
148 | name: source_span
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "1.5.5"
152 | stack_trace:
153 | dependency: transitive
154 | description:
155 | name: stack_trace
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "1.9.3"
159 | stream_channel:
160 | dependency: transitive
161 | description:
162 | name: stream_channel
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "2.0.0"
166 | string_scanner:
167 | dependency: transitive
168 | description:
169 | name: string_scanner
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "1.0.5"
173 | term_glyph:
174 | dependency: transitive
175 | description:
176 | name: term_glyph
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "1.1.0"
180 | test_api:
181 | dependency: transitive
182 | description:
183 | name: test_api
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "0.2.11"
187 | typed_data:
188 | dependency: transitive
189 | description:
190 | name: typed_data
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "1.1.6"
194 | vector_math:
195 | dependency: transitive
196 | description:
197 | name: vector_math
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "2.0.8"
201 | xml:
202 | dependency: transitive
203 | description:
204 | name: xml
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "3.5.0"
208 | sdks:
209 | dart: ">=2.4.0 <3.0.0"
210 |
--------------------------------------------------------------------------------
/flutter_clock_helper/lib/customizer.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | import 'model.dart';
8 |
9 | /// Returns a clock [Widget] with [ClockModel].
10 | ///
11 | /// Example:
12 | /// final myClockBuilder = (ClockModel model) => AnalogClock(model);
13 | ///
14 | /// Contestants: Do not edit this.
15 | typedef Widget ClockBuilder(ClockModel model);
16 |
17 | /// Wrapper for clock widget to allow for customizations.
18 | ///
19 | /// Puts the clock in landscape orientation with an aspect ratio of 5:3.
20 | /// Provides a drawer where users can customize the data that is sent to the
21 | /// clock. To show/hide the drawer, double-tap the clock.
22 | ///
23 | /// To use the [ClockCustomizer], pass your clock into it, using a ClockBuilder.
24 | ///
25 | /// ```
26 | /// final myClockBuilder = (ClockModel model) => AnalogClock(model);
27 | /// return ClockCustomizer(myClockBuilder);
28 | /// ```
29 | /// Contestants: Do not edit this.
30 | class ClockCustomizer extends StatefulWidget {
31 | const ClockCustomizer(this._clock);
32 |
33 | /// The clock widget with [ClockModel], to update and display.
34 | final ClockBuilder _clock;
35 |
36 | @override
37 | _ClockCustomizerState createState() => _ClockCustomizerState();
38 | }
39 |
40 | class _ClockCustomizerState extends State {
41 | final _model = ClockModel();
42 | ThemeMode _themeMode = ThemeMode.light;
43 | bool _configButtonShown = false;
44 |
45 | @override
46 | void initState() {
47 | super.initState();
48 | _model.addListener(_handleModelChange);
49 | }
50 |
51 | @override
52 | void dispose() {
53 | _model.removeListener(_handleModelChange);
54 | _model.dispose();
55 | super.dispose();
56 | }
57 |
58 | void _handleModelChange() => setState(() {});
59 |
60 | Widget _enumMenu(
61 | String label, T value, List items, ValueChanged onChanged) {
62 | return InputDecorator(
63 | decoration: InputDecoration(
64 | labelText: label,
65 | ),
66 | child: DropdownButtonHideUnderline(
67 | child: DropdownButton(
68 | value: value,
69 | isDense: true,
70 | onChanged: onChanged,
71 | items: items.map((T item) {
72 | return DropdownMenuItem(
73 | value: item,
74 | child: Text(enumToString(item)),
75 | );
76 | }).toList(),
77 | ),
78 | ),
79 | );
80 | }
81 |
82 | Widget _switch(String label, bool value, ValueChanged onChanged) {
83 | return Row(
84 | children: [
85 | Expanded(child: Text(label)),
86 | Switch(
87 | value: value,
88 | onChanged: onChanged,
89 | ),
90 | ],
91 | );
92 | }
93 |
94 | Widget _textField(
95 | String currentValue, String label, ValueChanged onChanged) {
96 | return TextField(
97 | decoration: InputDecoration(
98 | hintText: currentValue,
99 | helperText: label,
100 | ),
101 | onChanged: onChanged,
102 | );
103 | }
104 |
105 | Widget _configDrawer(BuildContext context) {
106 | return SafeArea(
107 | child: Drawer(
108 | child: Padding(
109 | padding: const EdgeInsets.all(16.0),
110 | child: SingleChildScrollView(
111 | child: Column(
112 | children: [
113 | _textField(_model.location, 'Location', (String location) {
114 | setState(() {
115 | _model.location = location;
116 | });
117 | }),
118 | _textField(_model.temperature.toString(), 'Temperature',
119 | (String temperature) {
120 | setState(() {
121 | _model.temperature = double.parse(temperature);
122 | });
123 | }),
124 | _enumMenu('Theme', _themeMode,
125 | ThemeMode.values.toList()..remove(ThemeMode.system),
126 | (ThemeMode mode) {
127 | setState(() {
128 | _themeMode = mode;
129 | });
130 | }),
131 | _switch('24-hour format', _model.is24HourFormat, (bool value) {
132 | setState(() {
133 | _model.is24HourFormat = value;
134 | });
135 | }),
136 | _enumMenu(
137 | 'Weather', _model.weatherCondition, WeatherCondition.values,
138 | (WeatherCondition condition) {
139 | setState(() {
140 | _model.weatherCondition = condition;
141 | });
142 | }),
143 | _enumMenu('Units', _model.unit, TemperatureUnit.values,
144 | (TemperatureUnit unit) {
145 | setState(() {
146 | _model.unit = unit;
147 | });
148 | }),
149 | ],
150 | ),
151 | ),
152 | ),
153 | ),
154 | );
155 | }
156 |
157 | Widget _configButton() {
158 | return Builder(
159 | builder: (BuildContext context) {
160 | return IconButton(
161 | icon: Icon(Icons.settings),
162 | tooltip: 'Configure clock',
163 | onPressed: () {
164 | Scaffold.of(context).openEndDrawer();
165 | setState(() {
166 | _configButtonShown = false;
167 | });
168 | },
169 | );
170 | },
171 | );
172 | }
173 |
174 | @override
175 | Widget build(BuildContext context) {
176 | final clock = Center(
177 | child: AspectRatio(
178 | aspectRatio: 5 / 3,
179 | child: Container(
180 | decoration: BoxDecoration(
181 | border: Border.all(
182 | width: 2,
183 | color: Theme.of(context).unselectedWidgetColor,
184 | ),
185 | ),
186 | child: widget._clock(_model),
187 | ),
188 | ),
189 | );
190 |
191 | return MaterialApp(
192 | theme: ThemeData.light(),
193 | darkTheme: ThemeData.dark(),
194 | themeMode: _themeMode,
195 | debugShowCheckedModeBanner: false,
196 | home: Scaffold(
197 | resizeToAvoidBottomPadding: false,
198 | endDrawer: _configDrawer(context),
199 | body: SafeArea(
200 | child: GestureDetector(
201 | behavior: HitTestBehavior.opaque,
202 | onTap: () {
203 | setState(() {
204 | _configButtonShown = !_configButtonShown;
205 | });
206 | },
207 | child: Stack(
208 | children: [
209 | clock,
210 | if (_configButtonShown)
211 | Positioned(
212 | top: 0,
213 | right: 0,
214 | child: Opacity(
215 | opacity: 0.7,
216 | child: _configButton(),
217 | ),
218 | ),
219 | ],
220 | ),
221 | ),
222 | ),
223 | ),
224 | );
225 | }
226 | }
227 |
--------------------------------------------------------------------------------
/digital_clock/lib/digital_clock.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter_clock_helper/model.dart';
6 | import 'package:flutter/material.dart';
7 | import 'dart:math';
8 | import 'package:flutter/scheduler.dart';
9 | import 'package:flutter/services.dart';
10 |
11 | import 'node.dart';
12 | import 'globals.dart';
13 |
14 | // An array of all the nodes which are animated
15 | // The fluidity of the animation is highly dependent on the size of this array
16 | // change for convenience
17 | List nodes = List(2500);
18 |
19 | /// A digital clock.
20 | ///
21 | /// You can do better than this!
22 | class DigitalClock extends StatefulWidget {
23 | const DigitalClock(this.model);
24 |
25 | final ClockModel model;
26 |
27 | @override
28 | _DigitalClockState createState() => _DigitalClockState();
29 | }
30 |
31 | class _DigitalClockState extends State {
32 | DateTime _dateTime = DateTime.now();
33 | Ticker _ticker;
34 |
35 | @override
36 | void initState() {
37 | super.initState();
38 |
39 | widget.model.addListener(_updateModel);
40 |
41 | SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]);
42 |
43 | //setup Nodes: one half of the nodes are static and do not move, the other have does
44 | for (int i = 0; i < 600; i++) {
45 | nodes[i] = Node(true);
46 | }
47 |
48 | for (int i = 600; i < nodes.length; i++) {
49 | nodes[i] = Node(false);
50 | }
51 |
52 | for (int i = 0; i < quadrantDescriptors.length; i++) {
53 | quadrantDescriptors[i] = QuadrantDescriptor();
54 | }
55 |
56 | //we use a ticker to regularly update the state, so that the clock is redrawn
57 | _ticker = Ticker(_updateTime);
58 | _ticker.start();
59 | }
60 |
61 | @override
62 | void didUpdateWidget(DigitalClock oldWidget) {
63 | super.didUpdateWidget(oldWidget);
64 | if (widget.model != oldWidget.model) {
65 | oldWidget.model.removeListener(_updateModel);
66 | widget.model.addListener(_updateModel);
67 | }
68 | }
69 |
70 | @override
71 | void dispose() {
72 | widget.model.removeListener(_updateModel);
73 | super.dispose();
74 | }
75 |
76 | void _updateModel() {
77 | setState(() {});
78 | }
79 |
80 | ///the method invoked by the ticker, which just updates the current time
81 | void _updateTime(Duration d) {
82 | setState(() {
83 | _dateTime = DateTime.now();
84 | });
85 | }
86 |
87 | @override
88 | Widget build(BuildContext context) {
89 | int hour = _dateTime.hour;
90 | if (!widget.model.is24HourFormat) {
91 | hour %= 12;
92 | }
93 | int minute = _dateTime.minute;
94 |
95 | bool inside =
96 | Theme.of(context).brightness == Brightness.light ? true : false;
97 |
98 | double percentageOfMinute = _dateTime.millisecond.toDouble() / 60000.0 +
99 | _dateTime.second.toDouble() / 60.0;
100 |
101 | return Container(
102 | color: Colors.black,
103 | child: CustomPaint(
104 | painter: Painter(hour, minute, percentageOfMinute, inside)));
105 | }
106 | }
107 |
108 |
109 |
110 | /// [QuadrantDescriptor] a helper class, which we use to keep track, how many nodes are in a quadrant
111 | /// the real information is stored in the indexs array, the QuadrantDescriptors, just describe the structural information of the array
112 | /// [size] how many nodes are in the quadrant
113 | /// [beginningIndex] in the
114 | /// [filled] how many nodes of the quadrant are already found
115 | /// in this way we define a slice of the indexs array, which only holds indexs of nodes, which belong to one quadrant
116 | class QuadrantDescriptor {
117 | int size = 0;
118 | int beginningIndex = 0;
119 | int filled = 0;
120 |
121 | void reset() {
122 | size = 0;
123 | beginningIndex = 0;
124 | filled = 0;
125 | }
126 | }
127 |
128 | // for maintain a QuadrantDescriptor for every quadrant
129 | List quadrantDescriptors = List(quadrants());
130 |
131 | // aspect ratio of the screen is 5/3
132 | double aspectRatio = 5 / 3;
133 |
134 | /// A custom painter, which is used to animate the clockface
135 | class Painter extends CustomPainter {
136 | int _hour, _minute;
137 | double _percentageOfMinute = 0.0;
138 | bool _drawInside;
139 |
140 | Painter(this._hour, this._minute, this._percentageOfMinute, this._drawInside);
141 |
142 | /// the paint function is used in a similar way to the main loop of a game:
143 | /// first the state of the world (in this case mainly the position of the nodes) is simulated
144 | /// second the world state is drawn, i.e. each node tests if it has close neightbors and draws a line to them
145 | @override
146 | void paint(Canvas canvas, Size size) {
147 | /// translate the point [p] from our local coordinate system into that of the canvas
148 | Point global(Point p) {
149 | return Point(p.x * size.height + size.width / 2,
150 | p.y * size.height + size.height / 2);
151 | }
152 |
153 | /// translates the point [p] into an equivalent offset
154 | Offset offset(Point p) {
155 | return Offset(p.x, p.y);
156 | }
157 |
158 | //reset the quadrantDescriptors
159 | for (var quadrantDescriptor in quadrantDescriptors) {
160 | quadrantDescriptor.reset();
161 | }
162 |
163 | // update the positions of the node, we use the quadrant assoziations to count the amount of nodes in each quadrant
164 | for (var node in nodes) {
165 | node.update();
166 | quadrantDescriptors[node.quadrant].size++;
167 | }
168 |
169 | // fill out the beginningIndexs of the quadrantDescriptors, by summing over the sizes
170 | int counter = 0;
171 | for (var quadrantDescriptor in quadrantDescriptors) {
172 | quadrantDescriptor.beginningIndex = counter;
173 | counter += quadrantDescriptor.size;
174 | }
175 |
176 | {
177 | // This is a list of indexes of the nodes, it is ordered by the quadrant association of the nodes,
178 | // i.e. first all indexes of nodes in the first quadrant appear, then of the second and so forth
179 | List indexs = List(nodes.length);
180 |
181 | // fill out the indexs array, by iterating over nodes, and saving the node at appropriate index according to the quadrantDescriptor
182 | for (int i = 0; i < nodes.length; i++) {
183 | var node = nodes[i];
184 | var listDescriptor = quadrantDescriptors[node.quadrant];
185 | int index = listDescriptor.beginningIndex + listDescriptor.filled;
186 | listDescriptor.filled++;
187 | indexs[index] = i;
188 | nodes[i].index = index;
189 | }
190 |
191 | //sort the nodes array, using the indexs array
192 | for (int i = 0; i < nodes.length; i++) {
193 | int index = indexs[i];
194 |
195 | //swap
196 | Node temp = nodes[i];
197 | int indexOfSwap = temp.index;
198 |
199 | nodes[i] = nodes[index];
200 | nodes[index] = temp;
201 |
202 | indexs[i] = i;
203 | indexs[indexOfSwap] = index;
204 | }
205 | }
206 |
207 | /// get the following, surrounding quadrants of [quadrant] are the return vakze:
208 | /// quadrant, right
209 | ///left under, under , right under
210 | List surroundingQuadrants(int quadrant) {
211 | List result = List();
212 |
213 | int x = quadrant % columns;
214 |
215 | int nQuadrants = quadrants();
216 |
217 | if (quadrant < nQuadrants) {
218 | result.add(quadrant);
219 | }
220 |
221 | if (x + 1 < columns && quadrant + 1 < nQuadrants) {
222 | result.add(quadrant + 1);
223 | }
224 |
225 | if (x - 1 > 0 && quadrant + columns - 1 < nQuadrants) {
226 | result.add(quadrant + columns - 1);
227 | }
228 |
229 | if (quadrant + columns < nQuadrants) {
230 | result.add(quadrant + columns);
231 | }
232 |
233 | if (x + 1 < columns && quadrant + columns + 1 < nQuadrants) {
234 | result.add(quadrant + columns + 1);
235 | }
236 | return result;
237 | }
238 |
239 | // ----- Draw step ----- //
240 |
241 | //draw half the screen black
242 | Paint white = Paint()
243 | ..style = PaintingStyle.fill
244 | ..color = Colors.white;
245 |
246 | // we compute a four sided polygon, which tints have the screen white (the other half is white)
247 | // it acts as a clockhand for the seconds
248 | Path path = Path();
249 | double angle = _percentageOfMinute * 2 * pi;
250 |
251 | double x, y;
252 | double tangensAngle = atan((size.width / 2) / (size.height / 2));
253 | if (angle < tangensAngle || angle > 2 * pi - tangensAngle) {
254 | x = tan(angle) * size.height / 2;
255 | path.moveTo(size.width / 2 + x, 0.0);
256 | path.lineTo(size.width, 0.0);
257 | path.lineTo(size.width, size.height);
258 | path.lineTo(size.width / 2 - x, size.height);
259 | } else if (angle < pi - tangensAngle) {
260 | y = tan(angle - pi / 2) * size.width / 2;
261 | path.moveTo(size.width, size.height / 2 + y);
262 | path.lineTo(size.width, size.height);
263 | path.lineTo(0.0, size.height);
264 | path.lineTo(0.0, size.height / 2 - y);
265 | } else if (angle < pi + tangensAngle) {
266 | x = tan(angle - pi) * size.height / 2;
267 | path.moveTo(size.width / 2 - x, size.height);
268 | path.lineTo(0.0, size.height);
269 | path.lineTo(0.0, 0.0);
270 | path.lineTo(size.width / 2 + x, 0.0);
271 | } else if (angle < 2 * pi - tangensAngle) {
272 | y = tan(angle - 3 * pi / 2) * size.width / 2;
273 | path.moveTo(0.0, size.height / 2 - y);
274 | path.lineTo(0.0, 0.0);
275 | path.lineTo(size.width, 0.0);
276 | path.lineTo(size.width, size.height / 2 + y);
277 | }
278 | path.close();
279 | canvas.drawPath(path, white);
280 |
281 | // this is a function that computes if a point is in the white four sided figure drawn above or not
282 | bool isBelowAngle(Point p) {
283 | double pointAngle;
284 | if (p.x > 0 && p.y < 0) {
285 | pointAngle = atan(p.x / -p.y);
286 | } else if (p.x > 0 && p.y > 0) {
287 | pointAngle = pi / 2 + atan(p.y / p.x);
288 | } else if (p.x <= 0 && p.y > 0) {
289 | pointAngle = pi + atan(-p.x / p.y);
290 | } else {
291 | pointAngle = 3 * pi / 2 + atan(-p.y / -p.x);
292 | }
293 |
294 | if (angle > pi && (pointAngle > angle || pointAngle < angle - pi)) {
295 | return true;
296 | } else if (angle < pi && pointAngle > angle && pointAngle < angle + pi) {
297 | return true;
298 | } else {
299 | return false;
300 | }
301 | }
302 |
303 | // iterate over the nodes and check every other node if it is near
304 | // as is appearent, algorithmn scales quadratically with the numbers of nodes,
305 | // because of this we have the optimization with the quadrants
306 | for (var node in nodes) {
307 | //do we have to draw things for this node?
308 | if (node.checkCoordinate(_hour, _minute, _drawInside)) {
309 | Point point1 = node.coordinate;
310 | Point globalPoint = global(point1);
311 |
312 | /* debug code: draws the nodes
313 | Offset off = Offset(globalPoint.x, globalPoint.y);
314 | Paint paint = Paint()
315 | ..color = Colors.red;
316 | canvas.drawCircle(off, 1, paint);
317 | */
318 |
319 | var quadrantsToCheck = surroundingQuadrants(node.quadrant);
320 |
321 | for (var index in quadrantsToCheck) {
322 | QuadrantDescriptor quadrantDescriptor = quadrantDescriptors[index];
323 | int startingIndex =
324 | max(quadrantDescriptor.beginningIndex, node.index);
325 |
326 | //iterate over the following nodes in the surrounding quadrant, which we can get by looking at the quadrantDescriptors
327 | for (int i = startingIndex;
328 | i < quadrantDescriptor.beginningIndex + quadrantDescriptor.size;
329 | i++) {
330 | // a node in the surrounding quadrants
331 | Node node2 = nodes[i];
332 | Point point2 = node2.coordinate;
333 | double distance = point1.distanceTo(point2);
334 |
335 | //do we have to draw things for this node
336 | if (node2.checkCoordinate(_hour, _minute, _drawInside)) {
337 | Point globalPoint2 = global(point2);
338 |
339 | //if the distance between nodes is small enough draw a line between them
340 | if (distance < maxDistanceBetweenNodes) {
341 | // we use a more pronaunced line, for close nodes
342 | // in technical terms: the alpha value of the linepaint is antiproportionally defined to the distance between the nodes
343 | double alpha = min(0.015 / (distance + 0.0001) , 1.0);
344 |
345 | Paint paint;
346 | if (isBelowAngle(point1)) {
347 | paint = Paint()
348 | ..color = Colors.black.withAlpha((alpha * 255).floor());
349 | } else {
350 | paint = Paint()
351 | ..color = Colors.white.withAlpha((alpha * 255).floor());
352 | }
353 |
354 | var offset1 = offset(globalPoint);
355 | var offset2 = offset(globalPoint2);
356 | canvas.drawLine(offset1, offset2, paint);
357 | }
358 | }
359 | }
360 | }
361 | }
362 | }
363 | }
364 |
365 | //always repaint, we want an animation, which is as smooth as possible
366 | @override
367 | bool shouldRepaint(CustomPainter oldDelegate) {
368 | return true;
369 | }
370 | }
371 |
--------------------------------------------------------------------------------
/digital_clock/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXCopyFilesBuildPhase section */
23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
24 | isa = PBXCopyFilesBuildPhase;
25 | buildActionMask = 2147483647;
26 | dstPath = "";
27 | dstSubfolderSpec = 10;
28 | files = (
29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
31 | );
32 | name = "Embed Frameworks";
33 | runOnlyForDeploymentPostprocessing = 0;
34 | };
35 | /* End PBXCopyFilesBuildPhase section */
36 |
37 | /* Begin PBXFileReference section */
38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
53 | /* End PBXFileReference section */
54 |
55 | /* Begin PBXFrameworksBuildPhase section */
56 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
62 | );
63 | runOnlyForDeploymentPostprocessing = 0;
64 | };
65 | /* End PBXFrameworksBuildPhase section */
66 |
67 | /* Begin PBXGroup section */
68 | 9740EEB11CF90186004384FC /* Flutter */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 3B80C3931E831B6300D905FE /* App.framework */,
72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
77 | );
78 | name = Flutter;
79 | sourceTree = "";
80 | };
81 | 97C146E51CF9000F007C117D = {
82 | isa = PBXGroup;
83 | children = (
84 | 9740EEB11CF90186004384FC /* Flutter */,
85 | 97C146F01CF9000F007C117D /* Runner */,
86 | 97C146EF1CF9000F007C117D /* Products */,
87 | );
88 | sourceTree = "";
89 | };
90 | 97C146EF1CF9000F007C117D /* Products */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 97C146EE1CF9000F007C117D /* Runner.app */,
94 | );
95 | name = Products;
96 | sourceTree = "";
97 | };
98 | 97C146F01CF9000F007C117D /* Runner */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
104 | 97C147021CF9000F007C117D /* Info.plist */,
105 | 97C146F11CF9000F007C117D /* Supporting Files */,
106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
110 | );
111 | path = Runner;
112 | sourceTree = "";
113 | };
114 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
115 | isa = PBXGroup;
116 | children = (
117 | );
118 | name = "Supporting Files";
119 | sourceTree = "";
120 | };
121 | /* End PBXGroup section */
122 |
123 | /* Begin PBXNativeTarget section */
124 | 97C146ED1CF9000F007C117D /* Runner */ = {
125 | isa = PBXNativeTarget;
126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
127 | buildPhases = (
128 | 9740EEB61CF901F6004384FC /* Run Script */,
129 | 97C146EA1CF9000F007C117D /* Sources */,
130 | 97C146EB1CF9000F007C117D /* Frameworks */,
131 | 97C146EC1CF9000F007C117D /* Resources */,
132 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
134 | );
135 | buildRules = (
136 | );
137 | dependencies = (
138 | );
139 | name = Runner;
140 | productName = Runner;
141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
142 | productType = "com.apple.product-type.application";
143 | };
144 | /* End PBXNativeTarget section */
145 |
146 | /* Begin PBXProject section */
147 | 97C146E61CF9000F007C117D /* Project object */ = {
148 | isa = PBXProject;
149 | attributes = {
150 | LastUpgradeCheck = 1020;
151 | ORGANIZATIONNAME = "The Chromium Authors";
152 | TargetAttributes = {
153 | 97C146ED1CF9000F007C117D = {
154 | CreatedOnToolsVersion = 7.3.1;
155 | LastSwiftMigration = 1100;
156 | };
157 | };
158 | };
159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
160 | compatibilityVersion = "Xcode 3.2";
161 | developmentRegion = en;
162 | hasScannedForEncodings = 0;
163 | knownRegions = (
164 | en,
165 | Base,
166 | );
167 | mainGroup = 97C146E51CF9000F007C117D;
168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
169 | projectDirPath = "";
170 | projectRoot = "";
171 | targets = (
172 | 97C146ED1CF9000F007C117D /* Runner */,
173 | );
174 | };
175 | /* End PBXProject section */
176 |
177 | /* Begin PBXResourcesBuildPhase section */
178 | 97C146EC1CF9000F007C117D /* Resources */ = {
179 | isa = PBXResourcesBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | };
189 | /* End PBXResourcesBuildPhase section */
190 |
191 | /* Begin PBXShellScriptBuildPhase section */
192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
193 | isa = PBXShellScriptBuildPhase;
194 | buildActionMask = 2147483647;
195 | files = (
196 | );
197 | inputPaths = (
198 | );
199 | name = "Thin Binary";
200 | outputPaths = (
201 | );
202 | runOnlyForDeploymentPostprocessing = 0;
203 | shellPath = /bin/sh;
204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
205 | };
206 | 9740EEB61CF901F6004384FC /* Run Script */ = {
207 | isa = PBXShellScriptBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | );
211 | inputPaths = (
212 | );
213 | name = "Run Script";
214 | outputPaths = (
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | shellPath = /bin/sh;
218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
219 | };
220 | /* End PBXShellScriptBuildPhase section */
221 |
222 | /* Begin PBXSourcesBuildPhase section */
223 | 97C146EA1CF9000F007C117D /* Sources */ = {
224 | isa = PBXSourcesBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXSourcesBuildPhase section */
233 |
234 | /* Begin PBXVariantGroup section */
235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
236 | isa = PBXVariantGroup;
237 | children = (
238 | 97C146FB1CF9000F007C117D /* Base */,
239 | );
240 | name = Main.storyboard;
241 | sourceTree = "";
242 | };
243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
244 | isa = PBXVariantGroup;
245 | children = (
246 | 97C147001CF9000F007C117D /* Base */,
247 | );
248 | name = LaunchScreen.storyboard;
249 | sourceTree = "";
250 | };
251 | /* End PBXVariantGroup section */
252 |
253 | /* Begin XCBuildConfiguration section */
254 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
255 | isa = XCBuildConfiguration;
256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
257 | buildSettings = {
258 | ALWAYS_SEARCH_USER_PATHS = NO;
259 | CLANG_ANALYZER_NONNULL = YES;
260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
261 | CLANG_CXX_LIBRARY = "libc++";
262 | CLANG_ENABLE_MODULES = YES;
263 | CLANG_ENABLE_OBJC_ARC = YES;
264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
265 | CLANG_WARN_BOOL_CONVERSION = YES;
266 | CLANG_WARN_COMMA = YES;
267 | CLANG_WARN_CONSTANT_CONVERSION = YES;
268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
270 | CLANG_WARN_EMPTY_BODY = YES;
271 | CLANG_WARN_ENUM_CONVERSION = YES;
272 | CLANG_WARN_INFINITE_RECURSION = YES;
273 | CLANG_WARN_INT_CONVERSION = YES;
274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
279 | CLANG_WARN_STRICT_PROTOTYPES = YES;
280 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
281 | CLANG_WARN_UNREACHABLE_CODE = YES;
282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
284 | COPY_PHASE_STRIP = NO;
285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
286 | ENABLE_NS_ASSERTIONS = NO;
287 | ENABLE_STRICT_OBJC_MSGSEND = YES;
288 | GCC_C_LANGUAGE_STANDARD = gnu99;
289 | GCC_NO_COMMON_BLOCKS = YES;
290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
292 | GCC_WARN_UNDECLARED_SELECTOR = YES;
293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
294 | GCC_WARN_UNUSED_FUNCTION = YES;
295 | GCC_WARN_UNUSED_VARIABLE = YES;
296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
297 | MTL_ENABLE_DEBUG_INFO = NO;
298 | SDKROOT = iphoneos;
299 | SUPPORTED_PLATFORMS = iphoneos;
300 | TARGETED_DEVICE_FAMILY = "1,2";
301 | VALIDATE_PRODUCT = YES;
302 | };
303 | name = Profile;
304 | };
305 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
306 | isa = XCBuildConfiguration;
307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
308 | buildSettings = {
309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
310 | CLANG_ENABLE_MODULES = YES;
311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
312 | ENABLE_BITCODE = NO;
313 | FRAMEWORK_SEARCH_PATHS = (
314 | "$(inherited)",
315 | "$(PROJECT_DIR)/Flutter",
316 | );
317 | INFOPLIST_FILE = Runner/Info.plist;
318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
319 | LIBRARY_SEARCH_PATHS = (
320 | "$(inherited)",
321 | "$(PROJECT_DIR)/Flutter",
322 | );
323 | PRODUCT_BUNDLE_IDENTIFIER = com.example.digitalClock;
324 | PRODUCT_NAME = "$(TARGET_NAME)";
325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
326 | SWIFT_VERSION = 5.0;
327 | VERSIONING_SYSTEM = "apple-generic";
328 | };
329 | name = Profile;
330 | };
331 | 97C147031CF9000F007C117D /* Debug */ = {
332 | isa = XCBuildConfiguration;
333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
334 | buildSettings = {
335 | ALWAYS_SEARCH_USER_PATHS = NO;
336 | CLANG_ANALYZER_NONNULL = YES;
337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
338 | CLANG_CXX_LIBRARY = "libc++";
339 | CLANG_ENABLE_MODULES = YES;
340 | CLANG_ENABLE_OBJC_ARC = YES;
341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
342 | CLANG_WARN_BOOL_CONVERSION = YES;
343 | CLANG_WARN_COMMA = YES;
344 | CLANG_WARN_CONSTANT_CONVERSION = YES;
345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
347 | CLANG_WARN_EMPTY_BODY = YES;
348 | CLANG_WARN_ENUM_CONVERSION = YES;
349 | CLANG_WARN_INFINITE_RECURSION = YES;
350 | CLANG_WARN_INT_CONVERSION = YES;
351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
356 | CLANG_WARN_STRICT_PROTOTYPES = YES;
357 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
358 | CLANG_WARN_UNREACHABLE_CODE = YES;
359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
361 | COPY_PHASE_STRIP = NO;
362 | DEBUG_INFORMATION_FORMAT = dwarf;
363 | ENABLE_STRICT_OBJC_MSGSEND = YES;
364 | ENABLE_TESTABILITY = YES;
365 | GCC_C_LANGUAGE_STANDARD = gnu99;
366 | GCC_DYNAMIC_NO_PIC = NO;
367 | GCC_NO_COMMON_BLOCKS = YES;
368 | GCC_OPTIMIZATION_LEVEL = 0;
369 | GCC_PREPROCESSOR_DEFINITIONS = (
370 | "DEBUG=1",
371 | "$(inherited)",
372 | );
373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
375 | GCC_WARN_UNDECLARED_SELECTOR = YES;
376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
377 | GCC_WARN_UNUSED_FUNCTION = YES;
378 | GCC_WARN_UNUSED_VARIABLE = YES;
379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
380 | MTL_ENABLE_DEBUG_INFO = YES;
381 | ONLY_ACTIVE_ARCH = YES;
382 | SDKROOT = iphoneos;
383 | TARGETED_DEVICE_FAMILY = "1,2";
384 | };
385 | name = Debug;
386 | };
387 | 97C147041CF9000F007C117D /* Release */ = {
388 | isa = XCBuildConfiguration;
389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
390 | buildSettings = {
391 | ALWAYS_SEARCH_USER_PATHS = NO;
392 | CLANG_ANALYZER_NONNULL = YES;
393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
394 | CLANG_CXX_LIBRARY = "libc++";
395 | CLANG_ENABLE_MODULES = YES;
396 | CLANG_ENABLE_OBJC_ARC = YES;
397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
398 | CLANG_WARN_BOOL_CONVERSION = YES;
399 | CLANG_WARN_COMMA = YES;
400 | CLANG_WARN_CONSTANT_CONVERSION = YES;
401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
403 | CLANG_WARN_EMPTY_BODY = YES;
404 | CLANG_WARN_ENUM_CONVERSION = YES;
405 | CLANG_WARN_INFINITE_RECURSION = YES;
406 | CLANG_WARN_INT_CONVERSION = YES;
407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
412 | CLANG_WARN_STRICT_PROTOTYPES = YES;
413 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
414 | CLANG_WARN_UNREACHABLE_CODE = YES;
415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
417 | COPY_PHASE_STRIP = NO;
418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
419 | ENABLE_NS_ASSERTIONS = NO;
420 | ENABLE_STRICT_OBJC_MSGSEND = YES;
421 | GCC_C_LANGUAGE_STANDARD = gnu99;
422 | GCC_NO_COMMON_BLOCKS = YES;
423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
425 | GCC_WARN_UNDECLARED_SELECTOR = YES;
426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
427 | GCC_WARN_UNUSED_FUNCTION = YES;
428 | GCC_WARN_UNUSED_VARIABLE = YES;
429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
430 | MTL_ENABLE_DEBUG_INFO = NO;
431 | SDKROOT = iphoneos;
432 | SUPPORTED_PLATFORMS = iphoneos;
433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
434 | TARGETED_DEVICE_FAMILY = "1,2";
435 | VALIDATE_PRODUCT = YES;
436 | };
437 | name = Release;
438 | };
439 | 97C147061CF9000F007C117D /* Debug */ = {
440 | isa = XCBuildConfiguration;
441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
442 | buildSettings = {
443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
444 | CLANG_ENABLE_MODULES = YES;
445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
446 | ENABLE_BITCODE = NO;
447 | FRAMEWORK_SEARCH_PATHS = (
448 | "$(inherited)",
449 | "$(PROJECT_DIR)/Flutter",
450 | );
451 | INFOPLIST_FILE = Runner/Info.plist;
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
453 | LIBRARY_SEARCH_PATHS = (
454 | "$(inherited)",
455 | "$(PROJECT_DIR)/Flutter",
456 | );
457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.digitalClock;
458 | PRODUCT_NAME = "$(TARGET_NAME)";
459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
461 | SWIFT_VERSION = 5.0;
462 | VERSIONING_SYSTEM = "apple-generic";
463 | };
464 | name = Debug;
465 | };
466 | 97C147071CF9000F007C117D /* Release */ = {
467 | isa = XCBuildConfiguration;
468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
469 | buildSettings = {
470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
471 | CLANG_ENABLE_MODULES = YES;
472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
473 | ENABLE_BITCODE = NO;
474 | FRAMEWORK_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "$(PROJECT_DIR)/Flutter",
477 | );
478 | INFOPLIST_FILE = Runner/Info.plist;
479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
480 | LIBRARY_SEARCH_PATHS = (
481 | "$(inherited)",
482 | "$(PROJECT_DIR)/Flutter",
483 | );
484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.digitalClock;
485 | PRODUCT_NAME = "$(TARGET_NAME)";
486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
487 | SWIFT_VERSION = 5.0;
488 | VERSIONING_SYSTEM = "apple-generic";
489 | };
490 | name = Release;
491 | };
492 | /* End XCBuildConfiguration section */
493 |
494 | /* Begin XCConfigurationList section */
495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
496 | isa = XCConfigurationList;
497 | buildConfigurations = (
498 | 97C147031CF9000F007C117D /* Debug */,
499 | 97C147041CF9000F007C117D /* Release */,
500 | 249021D3217E4FDB00AE95B9 /* Profile */,
501 | );
502 | defaultConfigurationIsVisible = 0;
503 | defaultConfigurationName = Release;
504 | };
505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
506 | isa = XCConfigurationList;
507 | buildConfigurations = (
508 | 97C147061CF9000F007C117D /* Debug */,
509 | 97C147071CF9000F007C117D /* Release */,
510 | 249021D4217E4FDB00AE95B9 /* Profile */,
511 | );
512 | defaultConfigurationIsVisible = 0;
513 | defaultConfigurationName = Release;
514 | };
515 | /* End XCConfigurationList section */
516 | };
517 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
518 | }
519 |
--------------------------------------------------------------------------------