Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions .fvm/fvm_config.json

This file was deleted.

4 changes: 4 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"flutter": "stable",
"flavors": {}
}
88 changes: 59 additions & 29 deletions demo/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,59 +1,89 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
def localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localPropertiesFile.withReader("UTF-8") { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) {
flutterVersionCode = '1'
flutterVersionCode = "1"
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
flutterVersionName = '1.0'
flutterVersionName = "1.0"
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
compileSdkVersion 31
namespace = "com.example.example"
compileSdk = 35
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
kotlinOptions {
jvmTarget = '17'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.example"
minSdkVersion 16
targetSdkVersion 31
minSdk 29
targetSdk 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}

signingConfigs {
file(rootProject.file('key.properties')).with { propFile ->
if (propFile.canRead()) {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
file(rootProject.file('key.properties')).with { propFile ->
if (propFile.canRead()) {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

applicationVariants.all { variant ->
variant.outputs.all { output ->
output.outputFileName = "app-release.apk"
}
}
}
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
source = "../.."
}
21 changes: 4 additions & 17 deletions demo/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
buildscript {
ext.kotlin_version = '1.6.21'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

rootProject.buildDir = '../build'
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
project.evaluationDependsOn(":app")
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion demo/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
31 changes: 23 additions & 8 deletions demo/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.4" apply false

id "org.jetbrains.kotlin.android" version "1.9.0" apply false
}

include ":app"
38 changes: 19 additions & 19 deletions demo/lib/screen/development_screen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:faker/faker.dart';
import 'package:faker/faker.dart' as mahmoudFaker;
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:pluto_grid/pluto_grid.dart';
Expand Down Expand Up @@ -58,7 +58,7 @@ class _DevelopmentScreenState extends State<DevelopmentScreen> {
enableCellBorderHorizontal: true,
// oddRowColor: Colors.amber,
// evenRowColor: const Color(0xFFF6F6F6),
cellColorGroupedRow: const Color(0x80F6F6F6),
//cellColorGroupedRow: const Color(0x80F6F6F6),
gridBorderRadius: BorderRadius.circular(10),
gridPopupBorderRadius: BorderRadius.circular(7),
// columnAscendingIcon: const Icon(
Expand Down Expand Up @@ -128,11 +128,11 @@ class _DevelopmentScreenState extends State<DevelopmentScreen> {
columns.addAll(testColumnsA);
columnGroups.addAll(testColumnGroupsA);
rows.addAll(DummyData.rowsByColumns(length: 10000, columns: columns));
rowColorCallback = (PlutoRowColorContext rowColorContext) {
return rowColorContext.row.cells['column2']?.value == 'green'
? const Color(0xFFE2F6DF)
: Colors.white;
};
// rowColorCallback = (PlutoRowColorContext rowColorContext) {
// return rowColorContext.row.cells['column2']?.value == 'green'
// ? const Color(0xFFE2F6DF)
// : Colors.white;
// };
}

/// Test B
Expand Down Expand Up @@ -328,7 +328,7 @@ class _DevelopmentScreenState extends State<DevelopmentScreen> {
return PlutoPagination(stateManager);
},
noRowsWidget: const _NoRows(),
rowColorCallback: rowColorCallback,
//rowColorCallback: rowColorCallback,
configuration: _configuration,
),
),
Expand Down Expand Up @@ -439,7 +439,7 @@ class _HeaderState extends State<_Header> {
0,
[
PlutoColumn(
title: faker.food.cuisine(),
title: "mahmoud update title", //mahmoudFaker.Company.cuisine(),
field: 'new_${DateTime.now()}',
type: PlutoColumnType.text(),
frozen: frozen,
Expand Down Expand Up @@ -1023,20 +1023,20 @@ final testColumnsA = [
enableColumnFilter: true,
),
renderer: (rendererContext) {
Color textColor = Colors.black;

if (rendererContext.cell.value == 'red') {
textColor = Colors.red;
} else if (rendererContext.cell.value == 'blue') {
textColor = Colors.blue;
} else if (rendererContext.cell.value == 'green') {
textColor = Colors.green;
}
// Color textColor = Colors.black;

// if (rendererContext.cell.value == 'red') {
// textColor = Colors.red;
// } else if (rendererContext.cell.value == 'blue') {
// textColor = Colors.blue;
// } else if (rendererContext.cell.value == 'green') {
// textColor = Colors.green;
// }

return Text(
rendererContext.cell.value.toString(),
style: TextStyle(
color: textColor,
// color: textColor,
fontWeight: FontWeight.bold,
),
textAlign: rendererContext.column.textAlign.value,
Expand Down
20 changes: 10 additions & 10 deletions demo/lib/screen/feature/add_and_remove_column_row_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@ class _AddAndRemoveColumnRowScreenState
TextSpan(text: 'Status'),
]),
renderer: (rendererContext) {
Color textColor = Colors.black;

if (rendererContext.cell.value == 'saved') {
textColor = Colors.green;
} else if (rendererContext.cell.value == 'edited') {
textColor = Colors.red;
} else if (rendererContext.cell.value == 'created') {
textColor = Colors.blue;
}
//Color textColor = Colors.black;

// if (rendererContext.cell.value == 'saved') {
// textColor = Colors.green;
// } else if (rendererContext.cell.value == 'edited') {
// textColor = Colors.red;
// } else if (rendererContext.cell.value == 'created') {
// textColor = Colors.blue;
// }

return Text(
rendererContext.cell.value.toString(),
style: TextStyle(
color: textColor,
//color: textColor,
fontWeight: FontWeight.bold,
),
);
Expand Down
1 change: 0 additions & 1 deletion demo/linux/flutter/ephemeral/.plugin_symlinks/printing

This file was deleted.

Loading