Skip to content

Commit 8c4cc7a

Browse files
New samples added.
1 parent c7cc813 commit 8c4cc7a

File tree

405 files changed

+122002
-25992
lines changed

Some content is hidden

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

405 files changed

+122002
-25992
lines changed

README.md

+10-57
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,16 @@
1-
# Syncfusion Flutter Examples
1+
# flutter_examples
22

3-
This repository contains the demos of Syncfusion Flutter UI widgets. This is the best place to check our widgets to get more insight about the usage of APIs. You can also check our widgets by installing the [sample browser application](https://play.google.com/store/apps/details?id=com.syncfusion.flutter.examples&hl=en) from Google Play Store, in which you can browse the demos for all the available widgets and view the source code of each example within the app itself.
3+
This project contains the Syncfusion Flutter UI widgets examples.
44

5-
![showcase_image](https://cdn.syncfusion.com/content/images/FTControl/screen2.png)
5+
## Getting Started
66

7-
This section guides you how to use the Syncfusion Flutter examples in your applications.
7+
This project is a starting point for a Flutter application.
88

9-
## Table of contents
9+
A few resources to get you started if this is your first Flutter project:
1010

11-
* [Requirements to run the demo](#requirements-to-run-the-demo)
12-
* [Repository structure](#repository-structure)
13-
* [Using the samples](#using-the-samples)
14-
* [Support and feedback](#support-and-feedback)
15-
* [Screenshots](#screenshots)
16-
* [Disclaimer](#disclaimer)
17-
* [About Syncfusion](#about-syncfusion)
11+
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
1813

19-
## <a name="requirements-to-run-the-demo"></a>Requirements to run the demo ##
20-
21-
* [Flutter SDK](https://flutter.dev/docs/get-started/install/windows)
22-
* [Android studio](https://developer.android.com/studio/install) or [Visual studio code](https://code.visualstudio.com/download)
23-
* Install Flutter extension in Android studio or in [VS code](https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter)
24-
25-
## <a name="repository-structure"></a>Repository structure ##
26-
27-
This repository contains sample browser project. Each widgets sample will be found inside the lib/samples folder. Run this project to see the demo samples of all the Flutter widgets in single application.
28-
29-
## <a name="using-the-samples"></a>Using the samples ##
30-
31-
* Download or clone the files in repository.
32-
* Get the required packages referred in the project.
33-
34-
## <a name="support-and-feedback"></a>Support and Feedback ##
35-
36-
* For any other queries, reach our [Syncfusion support team](https://www.syncfusion.com/support/directtrac/incidents/newincident?utm_source=github&utm_medium=flutter_widgets) or post the queries through the [Community forums](https://www.syncfusion.com/forums?utm_source=github&utm_medium=flutter_widgets) and submit a feature request or a bug through our [Feedback portal](https://www.syncfusion.com/feedback/flutter).
37-
* To renew the subscription, click [renew](https://www.syncfusion.com/sales/products?utm_source=github&utm_medium=flutter_widgets) or contact our sales team at <salessupport@syncfusion.com>.
38-
39-
## <a name='screenshots'></a>Screenshots ##
40-
41-
### Chart types
42-
<p align="center">
43-
<img src="https://cdn.syncfusion.com/content/images/FTControl/chartTypes.png" alt="Chart Types"/>
44-
</p>
45-
46-
### Axis types
47-
<p align="center">
48-
<img src="https://cdn.syncfusion.com/content/images/FTControl/axisTypes.png" alt="Axis Types"/>
49-
</p>
50-
51-
### User interactions
52-
<p align="center">
53-
<img src="https://cdn.syncfusion.com/content/images/FTControl/userInteraction.gif" alt="User Interaction"/>
54-
</p>
55-
56-
## <a name="disclaimer"></a>Disclaimer ##
57-
58-
Syncfusion has no liability for any damage or consequence that may arise by the use or viewing of the examples. The examples are for demonstrative purposes and if you choose to use or access the examples you agree to not hold Syncfusion liable, in any form, for any damage that is related to use, accessing or otherwise viewing the examples. By accessing, viewing, or otherwise seeing the examples you acknowledge and agree Syncfusion’s examples will not allow you to seek injunctive relief in any form for any claim related to the sample. If you do not agree to this, do not view, access, utilize or otherwise do anything with Syncfusion’s examples.
59-
60-
## <a name="about-syncfusion"></a>About Syncfusion ##
61-
Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion has more than 20,000 customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies.
62-
63-
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/products/wpf-ui-controls), and [UWP](https://www.syncfusion.com/uwp-ui-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.
14+
For help getting started with Flutter, view our
15+
[online documentation](https://flutter.dev/docs), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.

analysis_options.yaml

+1-167
Original file line numberDiff line numberDiff line change
@@ -1,167 +1 @@
1-
# Specify analysis options.
2-
#
3-
# Until there are meta linter rules, each desired lint must be explicitly enabled.
4-
# See: https://github.com/dart-lang/linter/issues/288
5-
#
6-
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
7-
# See the configuration guide for more
8-
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
9-
#
10-
# There are other similar analysis options files in the flutter repos,
11-
# which should be kept in sync with this file:
12-
#
13-
# - analysis_options.yaml (this file)
14-
# - packages/flutter/lib/analysis_options_user.yaml
15-
# - https://github.com/flutter/plugins/blob/master/analysis_options.yaml
16-
# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
17-
#
18-
# This file contains the analysis options used by Flutter tools, such as IntelliJ,
19-
# Android Studio, and the `flutter analyze` command.
20-
21-
analyzer:
22-
strong-mode:
23-
implicit-dynamic: false
24-
errors:
25-
# treat missing required parameters as a warning (not a hint)
26-
missing_required_param: warning
27-
# treat missing returns as a warning (not a hint)
28-
missing_return: warning
29-
# allow having TODOs in the code
30-
todo: ignore
31-
exclude:
32-
- 'bin/cache/**'
33-
# the following two are relative to the stocks example and the flutter package respectively
34-
# see https://github.com/dart-lang/sdk/issues/28463
35-
- 'lib/i18n/stock_messages_*.dart'
36-
- 'lib/src/http/**'
37-
38-
linter:
39-
rules:
40-
# these rules are documented on and in the same order as
41-
# the Dart Lint rules page to make maintenance easier
42-
# https://github.com/dart-lang/linter/blob/master/example/all.yaml
43-
- always_declare_return_types
44-
- always_put_control_body_on_new_line
45-
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
46-
- always_require_non_null_named_parameters
47-
- always_specify_types
48-
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
49-
- avoid_as
50-
# - avoid_bool_literals_in_conditional_expressions # not yet tested
51-
# - avoid_catches_without_on_clauses # we do this commonly
52-
# - avoid_catching_errors # we do this commonly
53-
- avoid_classes_with_only_static_members
54-
# - avoid_double_and_int_checks # only useful when targeting JS runtime
55-
- avoid_empty_else
56-
- avoid_field_initializers_in_const_classes
57-
- avoid_function_literals_in_foreach_calls
58-
# - avoid_implementing_value_types # not yet tested
59-
- avoid_init_to_null
60-
# - avoid_js_rounded_ints # only useful when targeting JS runtime
61-
- avoid_null_checks_in_equality_operators
62-
# - avoid_positional_boolean_parameters # not yet tested
63-
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
64-
- avoid_relative_lib_imports
65-
- avoid_renaming_method_parameters
66-
- avoid_return_types_on_setters
67-
# - avoid_returning_null # there are plenty of valid reasons to return null
68-
- avoid_returning_null_for_void
69-
# - avoid_returning_this # there are plenty of valid reasons to return this
70-
# - avoid_setters_without_getters # not yet tested
71-
# - avoid_single_cascade_in_expression_statements # not yet tested
72-
- avoid_slow_async_io
73-
- avoid_types_as_parameter_names
74-
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
75-
- avoid_unused_constructor_parameters
76-
- avoid_void_async
77-
- await_only_futures
78-
- camel_case_types
79-
- cancel_subscriptions
80-
# - cascade_invocations # not yet tested
81-
# - close_sinks # not reliable enough
82-
# - comment_references # blocked on https://github.com/flutter/flutter/issues/20765
83-
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
84-
- control_flow_in_finally
85-
# - curly_braces_in_flow_control_structures # not yet tested
86-
- directives_ordering
87-
- empty_catches
88-
- empty_constructor_bodies
89-
- empty_statements
90-
# - file_names # not yet tested
91-
- flutter_style_todos
92-
- hash_and_equals
93-
- implementation_imports
94-
# - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811
95-
- iterable_contains_unrelated_type
96-
# - join_return_with_assignment # not yet tested
97-
- library_names
98-
- library_prefixes
99-
# - lines_longer_than_80_chars # not yet tested
100-
- list_remove_unrelated_type
101-
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
102-
- no_adjacent_strings_in_list
103-
- no_duplicate_case_values
104-
- non_constant_identifier_names
105-
# - null_closures # not yet tested
106-
# - omit_local_variable_types # opposite of always_specify_types
107-
# - one_member_abstracts # too many false positives
108-
# - only_throw_errors # https://github.com/flutter/flutter/issues/5792
109-
- package_api_docs
110-
- package_names
111-
- package_prefixed_library_names
112-
# - parameter_assignments # we do this commonly
113-
- prefer_adjacent_string_concatenation
114-
- prefer_asserts_in_initializer_lists
115-
- prefer_collection_literals
116-
- prefer_conditional_assignment
117-
- prefer_const_constructors
118-
- prefer_const_constructors_in_immutables
119-
- prefer_const_declarations
120-
- prefer_const_literals_to_create_immutables
121-
# - prefer_constructors_over_static_methods # not yet tested
122-
- prefer_contains
123-
- prefer_equal_for_default_values
124-
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
125-
- prefer_final_fields
126-
- prefer_final_locals
127-
- prefer_foreach
128-
# - prefer_function_declarations_over_variables # not yet tested
129-
- prefer_generic_function_type_aliases
130-
- prefer_initializing_formals
131-
# - prefer_int_literals # not yet tested
132-
# - prefer_interpolation_to_compose_strings # not yet tested
133-
- prefer_is_empty
134-
- prefer_is_not_empty
135-
- prefer_iterable_whereType
136-
# - prefer_mixin # https://github.com/dart-lang/language/issues/32
137-
- prefer_single_quotes
138-
- prefer_typing_uninitialized_variables
139-
- prefer_void_to_null
140-
# - public_member_api_docs # enabled on a case-by-case basis; see e.g. packages/analysis_options.yaml
141-
- recursive_getters
142-
- slash_for_doc_comments
143-
- sort_constructors_first
144-
- sort_pub_dependencies
145-
- sort_unnamed_constructors_first
146-
- test_types_in_equals
147-
- throw_in_finally
148-
# - type_annotate_public_apis # subset of always_specify_types
149-
- type_init_formals
150-
# - unawaited_futures # too many false positives
151-
- unnecessary_brace_in_string_interps
152-
- unnecessary_const
153-
- unnecessary_getters_setters
154-
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
155-
- unnecessary_new
156-
- unnecessary_null_aware_assignments
157-
- unnecessary_null_in_if_null_operators
158-
- unnecessary_parenthesis
159-
- unnecessary_statements
160-
- unnecessary_this
161-
- unrelated_type_equality_checks
162-
- use_rethrow_when_possible
163-
# - use_setters_to_change_properties # not yet tested
164-
# - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
165-
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
166-
- valid_regexps
167-
# - void_checks # not yet tested
1+
include: lib/analysis_options.yaml
-17 Bytes
Binary file not shown.

android/app/src/main/AndroidManifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.syncfusion.flutter_examples">
3+
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
34
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
45
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
56
<!-- io.flutter.app.FlutterApplication is an android.app.Application that

android/app/src/main/java/com/syncfusion/flutter_examples/MainActivity.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected void onCreate(Bundle savedInstanceState) {
2626
new MethodChannel(getFlutterView(), "launchFile").setMethodCallHandler(new MethodChannel.MethodCallHandler() {
2727
@Override
2828
public void onMethodCall(MethodCall call, MethodChannel.Result result) {
29-
if (call.method.equals("viewPdf")) {
29+
if (call.method.equals("viewPdf") || call.method.equals("viewExcel")) {
3030
String path = call.argument("file_path");
3131
if(!checkPermission(Manifest.permission.READ_EXTERNAL_STORAGE)){
3232
requestPermission(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE});
@@ -65,7 +65,10 @@ private void launchFile(String filePath){
6565
}else {
6666
uri = Uri.fromFile(file);
6767
}
68-
intent.setDataAndType(uri, "application/pdf");
68+
if(filePath.contains(".pdf"))
69+
intent.setDataAndType(uri, "application/pdf");
70+
else
71+
intent.setDataAndType(uri, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
6972
try{
7073
this.startActivity(intent);
7174
}catch (Exception e){

0 commit comments

Comments
 (0)