Skip to content

Commit 26631b5

Browse files
Merge pull request #5 from SyncfusionExamples/KBImprovements
FLUT-7193-KB sample updated
2 parents 0172aeb + b59ebbb commit 26631b5

File tree

98 files changed

+3334
-326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+3334
-326
lines changed

.gitignore

-73
This file was deleted.

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1-
**[View document in Syncfusion Flutter Knowledge base](https://www.syncfusion.com/kb/11204/how-to-design-and-configure-your-appointment-editor-in-flutter-event-calendar-sfcalendar)**
1+
# How to design and configure your appointment editor in Flutter Calendar?
22

3+
A quick-start example to help you to design and configure your appointment editor in Flutter Calendar.
4+
5+
Using the calendar widget's `OnTap` callback, you can create an appointment editor application with custom appointments in Flutter event calendar.
6+
7+
Follow the instruction in this [KB](https://www.syncfusion.com/kb/11204/how-to-design-and-configure-your-appointment-editor-in-flutter-calendar) documentation to add appointment editor in the Flutter Calendar.
8+
9+
## Requirements to run the demo
10+
* [VS Code](https://code.visualstudio.com/download)
11+
* [Flutter SDK v1.22+](https://flutter.dev/docs/development/tools/sdk/overview)
12+
* [For more development tools](https://flutter.dev/docs/development/tools/devtools/overview)
13+
14+
## How to run this application
15+
To run this application, you need to first clone or download the ‘create a flutter maps widget in 10 minutes’ repository and open it in your preferred IDE. Then, build and run your project to view the output.
16+
17+
## Further help
18+
For more help, check the [Syncfusion Flutter documentation](https://help.syncfusion.com/flutter/introduction/overview),
19+
[Flutter documentation](https://flutter.dev/docs/get-started/install).

analysis_options.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

android/app/build.gradle

+15-11
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,31 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 28
29+
compileSdkVersion flutter.compileSdkVersion
30+
ndkVersion flutter.ndkVersion
3031

31-
sourceSets {
32-
main.java.srcDirs += 'src/main/kotlin'
32+
compileOptions {
33+
sourceCompatibility JavaVersion.VERSION_1_8
34+
targetCompatibility JavaVersion.VERSION_1_8
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = '1.8'
3339
}
3440

35-
lintOptions {
36-
disable 'InvalidPackage'
41+
sourceSets {
42+
main.java.srcDirs += 'src/main/kotlin'
3743
}
3844

3945
defaultConfig {
4046
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4147
applicationId "com.example.scheduling_events"
42-
minSdkVersion 16
43-
targetSdkVersion 28
48+
// You can update the following values to match your application needs.
49+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
50+
minSdkVersion flutter.minSdkVersion
51+
targetSdkVersion flutter.targetSdkVersion
4452
versionCode flutterVersionCode.toInteger()
4553
versionName flutterVersionName
46-
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
4754
}
4855

4956
buildTypes {
@@ -61,7 +68,4 @@ flutter {
6168

6269
dependencies {
6370
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64-
testImplementation 'junit:junit:4.12'
65-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
66-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
6771
}

android/app/src/debug/AndroidManifest.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.example.scheduling_events">
3-
<!-- Flutter needs it to communicate with the running application
3+
<!-- The INTERNET permission is required for development. Specifically,
4+
the Flutter tool needs it to communicate with the running application
45
to allow setting breakpoints, to provide hot reload, etc.
56
-->
67
<uses-permission android:name="android.permission.INTERNET"/>
+17-18
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.example.scheduling_events">
3-
4-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
5-
calls FlutterMain.startInitialization(this); in its onCreate method.
6-
In most cases you can leave this as-is, but you if you want to provide
7-
additional functionality it is fine to subclass or reimplement
8-
FlutterApplication and put your custom class here. -->
9-
<application
3+
<application
104
android:label="scheduling_events"
5+
android:name="${applicationName}"
116
android:icon="@mipmap/ic_launcher">
127
<activity
13-
android:name="io.flutter.embedding.android.FlutterActivity"
8+
android:name=".MainActivity"
9+
android:exported="true"
1410
android:launchMode="singleTop"
1511
android:theme="@style/LaunchTheme"
16-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
12+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1713
android:hardwareAccelerated="true"
1814
android:windowSoftInputMode="adjustResize">
19-
<!-- This keeps the window background of the activity showing
20-
until Flutter renders its first frame. It can be removed if
21-
there is no splash screen (such as the default splash screen
22-
defined in @style/LaunchTheme). -->
15+
<!-- Specifies an Android theme to apply to this Activity as soon as
16+
the Android process has started. This theme is visible to the user
17+
while the Flutter UI initializes. After that, this theme continues
18+
to determine the Window background behind the Flutter UI. -->
2319
<meta-data
24-
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
25-
android:value="true" />
26-
<meta-data
27-
android:name="flutterEmbedding"
28-
android:value="2" />
20+
android:name="io.flutter.embedding.android.NormalTheme"
21+
android:resource="@style/NormalTheme"
22+
/>
2923
<intent-filter>
3024
<action android:name="android.intent.action.MAIN"/>
3125
<category android:name="android.intent.category.LAUNCHER"/>
3226
</intent-filter>
3327
</activity>
28+
<!-- Don't delete the meta-data below.
29+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
30+
<meta-data
31+
android:name="flutterEmbedding"
32+
android:value="2" />
3433
</application>
3534
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package io.flutter.plugins;
2+
3+
import androidx.annotation.Keep;
4+
import androidx.annotation.NonNull;
5+
import io.flutter.Log;
6+
7+
import io.flutter.embedding.engine.FlutterEngine;
8+
9+
/**
10+
* Generated file. Do not edit.
11+
* This file is generated by the Flutter tool based on the
12+
* plugins that support the Android platform.
13+
*/
14+
@Keep
15+
public final class GeneratedPluginRegistrant {
16+
private static final String TAG = "GeneratedPluginRegistrant";
17+
public static void registerWith(@NonNull FlutterEngine flutterEngine) {
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
the Flutter engine draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
18+
</resources>
+12-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
45
<!-- Show a splash screen on the activity. Automatically removed when
5-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
67
<item name="android:windowBackground">@drawable/launch_background</item>
78
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
818
</resources>

android/app/src/profile/AndroidManifest.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.example.scheduling_events">
3-
<!-- Flutter needs it to communicate with the running application
3+
<!-- The INTERNET permission is required for development. Specifically,
4+
the Flutter tool needs it to communicate with the running application
45
to allow setting breakpoints, to provide hot reload, etc.
56
-->
67
<uses-permission android:name="android.permission.INTERNET"/>

android/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
buildscript {
2-
ext.kotlin_version = '1.2.71'
2+
ext.kotlin_version = '1.6.10'
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.2.1'
9+
classpath 'com.android.tools.build:gradle:7.1.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
1313

1414
allprojects {
1515
repositories {
1616
google()
17-
jcenter()
17+
mavenCentral()
1818
}
1919
}
2020

android/gradle.properties

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
android.enableJetifier=true
2-
android.useAndroidX=true
31
org.gradle.jvmargs=-Xmx1536M
4-
2+
android.useAndroidX=true
3+
android.enableJetifier=true
52.4 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

0 commit comments

Comments
 (0)