Skip to content

Commit 099203f

Browse files
author
LavanyaA
authored
Merge pull request #891 from sfHariHaraSudhan/release_source_ex
Moved volume 01, 2025 release changes into master branch
2 parents a73a704 + 747d814 commit 099203f

File tree

656 files changed

+76764
-42742
lines changed

Some content is hidden

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

656 files changed

+76764
-42742
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.qodo

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ Take a look at the following to learn more about Syncfusion<sup>&reg;</sup> Flut
137137

138138
Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion<sup>&reg;</sup> has more than 20,000 customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies.
139139

140-
Today we provide 1,000+ controls and frameworks for web ([ASP.NET Core](https://www.syncfusion.com/aspnet-core-ui-controls), [ASP.NET MVC](https://www.syncfusion.com/aspnet-mvc-ui-controls), [ASP.NET WebForms](https://www.syncfusion.com/jquery/aspnet-web-forms-ui-controls), [JavaScript](https://www.syncfusion.com/javascript-ui-controls), [Angular](https://www.syncfusion.com/angular-ui-components), [React](https://www.syncfusion.com/react-ui-components), [Vue](https://www.syncfusion.com/vue-ui-components), and [Blazor](https://www.syncfusion.com/blazor-components)), mobile ([Xamarin](https://www.syncfusion.com/xamarin-ui-controls), [Flutter](https://www.syncfusion.com/flutter-widgets), [UWP](https://www.syncfusion.com/uwp-ui-controls), and [JavaScript](https://www.syncfusion.com/javascript-ui-controls)), and desktop development ([WinForms](https://www.syncfusion.com/winforms-ui-controls), [WPF](https://www.syncfusion.com/wpf-ui-controls), and [UWP](https://www.syncfusion.com/uwp-ui-controls) and [WinUI](https://www.syncfusion.com/winui-controls)). We provide ready-to deploy enterprise software for dashboards, reports, data integration, and big data processing. Many customers have saved millions in licensing fees by deploying our software.
140+
Today we provide 1,000+ controls and frameworks for web ([ASP.NET Core](https://www.syncfusion.com/aspnet-core-ui-controls), [ASP.NET MVC](https://www.syncfusion.com/aspnet-mvc-ui-controls), [ASP.NET WebForms](https://www.syncfusion.com/jquery/aspnet-web-forms-ui-controls), [JavaScript](https://www.syncfusion.com/javascript-ui-controls), [Angular](https://www.syncfusion.com/angular-ui-components), [React](https://www.syncfusion.com/react-ui-components), [Vue](https://www.syncfusion.com/vue-ui-components), and [Blazor](https://www.syncfusion.com/blazor-components), mobile ([Xamarin](https://www.syncfusion.com/xamarin-ui-controls), [Flutter](https://www.syncfusion.com/flutter-widgets), [UWP](https://www.syncfusion.com/uwp-ui-controls), and [JavaScript](https://www.syncfusion.com/javascript-ui-controls)), and desktop development ([WinForms](https://www.syncfusion.com/winforms-ui-controls), [WPF](https://www.syncfusion.com/wpf-ui-controls), and [UWP](https://www.syncfusion.com/uwp-ui-controls) and [WinUI](https://www.syncfusion.com/winui-controls)). We provide ready-to deploy enterprise software for dashboards, reports, data integration, and big data processing. Many customers have saved millions in licensing fees by deploying our software.

android/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/to/reference-keystore
11+
key.properties
12+
**/*.keystore
13+
**/*.jks

android/app/build.gradle

Lines changed: 23 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,44 @@
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.")
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
126
}
137

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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26-
278
android {
28-
if (project.android.hasProperty("namespace")) {
29-
namespace "com.syncfusion.flutter_examples"
9+
namespace = "com.syncfusion.flutter_examples"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
3016
}
31-
compileSdkVersion flutter.compileSdkVersion
3217

33-
lintOptions {
34-
disable 'InvalidPackage'
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_1_8
3520
}
3621

3722
defaultConfig {
3823
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
39-
applicationId "com.syncfusion.flutter_examples"
40-
minSdkVersion 19
41-
targetSdkVersion flutter.targetSdkVersion
42-
versionCode flutterVersionCode.toInteger()
43-
versionName flutterVersionName
44-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
24+
applicationId = "com.syncfusion.flutter_examples"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
4531
}
4632

4733
buildTypes {
4834
release {
49-
shrinkResources false
5035
// TODO: Add your own signing config for the release build.
5136
// Signing with the debug keys for now, so `flutter run --release` works.
52-
signingConfig signingConfigs.debug
37+
signingConfig = signingConfigs.debug
5338
}
5439
}
5540
}
5641

5742
flutter {
58-
source '../..'
59-
}
60-
61-
dependencies {
62-
testImplementation 'junit:junit:4.12'
63-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
64-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
43+
source = "../.."
6544
}

android/app/src/debug/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
<!-- Flutter needs it to communicate with the running application
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
34
to allow setting breakpoints, to provide hot reload, etc.
45
-->
56
<uses-permission android:name="android.permission.INTERNET"/>
Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,52 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
3-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
4-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
5-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
6-
calls FlutterMain.startInitialization(this); in its onCreate method.
7-
In most cases you can leave this as-is, but you if you want to provide
8-
additional functionality it is fine to subclass or reimplement
9-
FlutterApplication and put your custom class here. -->
102
<application
113
android:label="Syncfusion Flutter UI Widgets"
4+
android:name="${applicationName}"
125
android:icon="@mipmap/ic_launcher">
13-
<meta-data
14-
android:name="flutterEmbedding"
15-
android:value="2" />
16-
<provider
17-
android:name="androidx.core.content.FileProvider"
18-
android:authorities="${applicationId}.fileProvider"
19-
android:grantUriPermissions="true">
20-
<meta-data
21-
android:name="android.support.FILE_PROVIDER_PATHS"
22-
android:resource="@xml/provider_path"/>
23-
</provider>
246
<activity
257
android:name=".MainActivity"
268
android:exported="true"
279
android:launchMode="singleTop"
10+
android:taskAffinity=""
2811
android:theme="@style/LaunchTheme"
29-
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"
3013
android:hardwareAccelerated="true"
3114
android:windowSoftInputMode="adjustResize">
32-
<!-- This keeps the window background of the activity showing
33-
until Flutter renders its first frame. It can be removed if
34-
there is no splash screen (such as the default splash screen
35-
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. -->
3619
<meta-data
37-
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
38-
android:value="true" />
20+
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
21+
android:value="true" />
3922
<intent-filter>
4023
<action android:name="android.intent.action.MAIN"/>
4124
<category android:name="android.intent.category.LAUNCHER"/>
4225
</intent-filter>
4326
</activity>
27+
<!-- Don't delete the meta-data below.
28+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
29+
<meta-data
30+
android:name="flutterEmbedding"
31+
android:value="2" />
32+
<provider
33+
android:name="androidx.core.content.FileProvider"
34+
android:authorities="${applicationId}.fileProvider"
35+
android:grantUriPermissions="true">
36+
<meta-data
37+
android:name="android.support.FILE_PROVIDER_PATHS"
38+
android:resource="@xml/provider_path"/>
39+
</provider>
4440
</application>
41+
<!-- Required to query activities that can process text, see:
42+
https://developer.android.com/training/package-visibility and
43+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
44+
45+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
46+
<queries>
47+
<intent>
48+
<action android:name="android.intent.action.PROCESS_TEXT"/>
49+
<data android:mimeType="text/plain"/>
50+
</intent>
51+
</queries>
4552
</manifest>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package com.syncfusion.flutter_examples
2+
3+
import android.Manifest
4+
import android.content.Intent
5+
import android.net.Uri
6+
import android.os.Build
7+
import android.os.Bundle
8+
import androidx.core.app.ActivityCompat
9+
import androidx.core.content.ContextCompat
10+
import androidx.core.content.FileProvider
11+
import androidx.core.content.PermissionChecker
12+
import io.flutter.embedding.android.FlutterActivity
13+
import io.flutter.embedding.engine.FlutterEngine
14+
import io.flutter.plugin.common.MethodChannel
15+
import java.io.File
16+
17+
class MainActivity : FlutterActivity() {
18+
private val CHANNEL = "launchFile"
19+
20+
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
21+
super.configureFlutterEngine(flutterEngine)
22+
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler { call, result ->
23+
when (call.method) {
24+
"viewPdf", "viewExcel" -> {
25+
val path: String? = call.argument("file_path")
26+
if (path != null) {
27+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU && !checkPermission(Manifest.permission.READ_EXTERNAL_STORAGE)) {
28+
requestPermission(arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE))
29+
} else {
30+
launchFile(path)
31+
}
32+
} else {
33+
result.error("INVALID_PATH", "File path is null", null)
34+
}
35+
}
36+
else -> result.notImplemented()
37+
}
38+
}
39+
}
40+
41+
private fun requestPermission(permissions: Array<String>) {
42+
ActivityCompat.requestPermissions(this, permissions, 1)
43+
}
44+
45+
private fun checkPermission(permission: String): Boolean {
46+
return if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
47+
true
48+
} else {
49+
ContextCompat.checkSelfPermission(this, permission) == PermissionChecker.PERMISSION_GRANTED
50+
}
51+
}
52+
53+
private fun launchFile(filePath: String) {
54+
val file = File(filePath)
55+
if (file.exists()) {
56+
val intent = Intent(Intent.ACTION_VIEW)
57+
intent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP
58+
intent.addCategory(Intent.CATEGORY_DEFAULT)
59+
val uri: Uri = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
60+
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
61+
val packageName = this.packageName
62+
FileProvider.getUriForFile(this, "$packageName.fileProvider", file)
63+
} else {
64+
Uri.fromFile(file)
65+
}
66+
67+
intent.setDataAndType(
68+
uri,
69+
if (filePath.contains(".pdf")) "application/pdf" else "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
70+
)
71+
72+
try {
73+
startActivity(intent)
74+
} catch (e: Exception) {
75+
// Could not launch the file.
76+
}
77+
}
78+
}
79+
}
Lines changed: 12 additions & 0 deletions
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>

android/app/src/main/res/drawable/launch_background.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
<item android:drawable="@android:color/white" />
55

66
<!-- You can insert your own image assets here -->
7-
<item>
7+
<!-- <item>
88
<bitmap
9+
android:gravity="center"
910
android:src="@mipmap/launch_image" />
10-
</item>
11+
</item> -->
1112
</layer-list>
Lines changed: 18 additions & 0 deletions
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>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy