first commit

This commit is contained in:
kicap1992
2021-05-01 10:26:47 +08:00
commit 6b927d612c
78 changed files with 4194 additions and 0 deletions

46
.gitignore vendored Normal file
View File

@ -0,0 +1,46 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

10
.metadata Normal file
View File

@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: d1f73a10653471ad45add0aee54a6175ca742aaf
channel: master
project_type: app

13
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,13 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "barcode_absensi",
"request": "launch",
"type": "dart"
}
]
}

11
README.md Normal file
View File

@ -0,0 +1,11 @@
# barcode_absensi
My First Flutter Project Using
# QRCode Absensi
# Personal Website
https://www.kicap-karan.com
# Facebook
https://www.facebook.com/kicap.karan

921
analysis_options.yaml Normal file
View File

@ -0,0 +1,921 @@
##
# Lint rules to be used for apps without developer facing API. i.e. command line tools and Flutter applications
##
analyzer:
strong-mode:
# Will become the default once non-nullable types land
# https://github.com/dart-lang/sdk/issues/31410#issuecomment-510683629
implicit-casts: true
implicit-dynamic: true
errors:
# treat missing required parameters as a warning (not a hint)
missing_required_param: warning
# treat missing returns as a warning (not a hint)
missing_return: warning
# allow having TODOs in the code
todo: info
# Rules are in the same order (alphabetically) as documented at http://dart-lang.github.io/linter/lints
# and https://github.com/dart-lang/linter/blob/master/example/all.yaml
linter:
rules:
# Prevents accidental return type changes which results in a breaking API change.
# Enforcing return type makes API changes visible in a diff
# pedantic: enabled
# http://dart-lang.github.io/linter/lints/always_declare_return_types.html
- always_declare_return_types
# Single line `if`s are fine as recommended in Effective Dart "DO format your code using dartfmt"
# pedantic: disabled
# http://dart-lang.github.io/linter/lints/always_put_control_body_on_new_line.html
# - always_put_control_body_on_new_line
# Flutter widgets always put a Key as first optional parameter which breaks this rule.
# Also violates other orderings like matching the class fields or alphabetically.
# pedantic: disabled
# http://dart-lang.github.io/linter/lints/always_declare_return_types.html
# - always_put_required_named_parameters_first
# All non nullable named parameters should be and annotated with @required.
# This allows API consumers to get warnings via lint rather than a crash a runtime.
# Might become obsolete with Non-Nullable types
# pedantic: enabled
# http://dart-lang.github.io/linter/lints/always_require_non_null_named_parameters.html
- always_require_non_null_named_parameters
# Since dart 2.0 dart is a sound language, specifying types is not required anymore.
# `var foo = 10;` is enough information for the compiler to make foo a int.
# Violates Effective Dart "AVOID type annotating initialized local variables".
# Makes code unnecessarily complex https://github.com/dart-lang/linter/issues/1620
# pedantic: disabled
# http://dart-lang.github.io/linter/lints/always_specify_types.html
# - always_specify_types
# Protect against unintentionally overriding superclass members
# pedantic: enabled
# http://dart-lang.github.io/linter/lints/annotate_overrides.html
- annotate_overrides
# All methods should define a return type. dynamic is no exception.
# Violates Effective Dart "PREFER annotating with dynamic instead of letting inference fail"
# pedantic: disabled
# http://dart-lang.github.io/linter/lints/avoid_annotating_with_dynamic.html
# - avoid_annotating_with_dynamic
# A leftover from dart1, should be deprecated
# pedantic: disabled
# - https://github.com/dart-lang/linter/issues/1401
# http://dart-lang.github.io/linter/lints/avoid_as.html
# - avoid_as
# Highlights boolean expressions which can be simplified
# http://dart-lang.github.io/linter/lints/avoid_bool_literals_in_conditional_expressions.html
- avoid_bool_literals_in_conditional_expressions
# There are no strong arguments to enable this rule because it is very strict. Catching anything is useful
# and common even if not always the most correct thing to do.
# pedantic: disabled
# http://dart-lang.github.io/linter/lints/avoid_catches_without_on_clauses.html
# - avoid_catches_without_on_clauses
# Errors aren't for catching but to prevent prior to runtime
# pedantic: disabled
# http://dart-lang.github.io/linter/lints/avoid_catching_errors.html
- avoid_catching_errors
# Can usually be replaced with an extension
# pedantic: disabled
# http://dart-lang.github.io/linter/lints/avoid_classes_with_only_static_members.html
- avoid_classes_with_only_static_members
# Never accidentally use dynamic invocations
# Dart SDK: unreleased • (Linter vnull)
# https://dart-lang.github.io/linter/lints/avoid_dynamic_calls.html
# avoid_dynamic_calls
# Only useful when targeting JS
# pedantic: disabled
# http://dart-lang.github.io/linter/lints/avoid_double_and_int_checks.html
# - avoid_double_and_int_checks
# Prevents accidental empty else cases. See samples in documentation
# pedantic: enabled
# http://dart-lang.github.io/linter/lints/avoid_empty_else.html
- avoid_empty_else
# It is expected that mutable objects which override hash & equals shouldn't be used as keys for hashmaps.
# This one use case doesn't make all hash & equals implementations for mutable classes bad.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/avoid_equals_and_hash_code_on_mutable_classes.html
# - avoid_equals_and_hash_code_on_mutable_classes
# Use different quotes instead of escaping
# Dart SDK: >= 2.8.0-dev.11.0 • (Linter v0.1.111)
# https://dart-lang.github.io/linter/lints/avoid_escaping_inner_quotes.html
- avoid_escaping_inner_quotes
# Prevents unnecessary allocation of a field
# pedantic: disabled
# http://dart-lang.github.io/linter/lints/avoid_field_initializers_in_const_classes.html
- avoid_field_initializers_in_const_classes
# Prevents allocating a lambda and allows return/break/continue control flow statements inside the loop
# http://dart-lang.github.io/linter/lints/avoid_function_literals_in_foreach_calls.html
- avoid_function_literals_in_foreach_calls
# Don't break value types by implementing them
# http://dart-lang.github.io/linter/lints/avoid_implementing_value_types.html
- avoid_implementing_value_types
# Removes redundant `= null;`
# https://dart-lang.github.io/linter/lints/avoid_init_to_null.html
- avoid_init_to_null
# Only useful when targeting JS
# Warns about too large integers when compiling to JS
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/avoid_js_rounded_ints.html
# - avoid_js_rounded_ints
# Null checks aren't required in ==() operators
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/avoid_null_checks_in_equality_operators.html
- avoid_null_checks_in_equality_operators
# Good APIs don't use ambiguous boolean parameters. Instead use named parameters
# https://dart-lang.github.io/linter/lints/avoid_positional_boolean_parameters.html
- avoid_positional_boolean_parameters
# Don't call print in production code
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/avoid_print.html
# - avoid_print
# Always prefer function references over typedefs.
# Jumping twice in code to see the signature of a lambda sucks. This is different from the flutter analysis_options
# https://dart-lang.github.io/linter/lints/avoid_private_typedef_functions.html
- avoid_private_typedef_functions
# Don't explicitly set defaults
# Dart SDK: >= 2.8.0-dev.1.0 • (Linter v0.1.107)
# https://dart-lang.github.io/linter/lints/avoid_redundant_argument_values.html
- avoid_redundant_argument_values
# package or relative? Let's end the discussion and use package everywhere.
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/avoid_relative_lib_imports.html
- avoid_relative_lib_imports
# Not recommended to break dartdoc but besides that there is no reason to continue with bad naming
# https://dart-lang.github.io/linter/lints/avoid_renaming_method_parameters.html
# - avoid_renaming_method_parameters
# Setters always return void, therefore defining void is redundant
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/avoid_return_types_on_setters.html
- avoid_return_types_on_setters
# Especially with Non-Nullable types on the horizon, `int?` is fine.
# There are plenty of valid reasons to return null.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/avoid_returning_null.html
# - avoid_returning_null
# Don't use `Future?`, therefore never return null instead of a Future.
# Will become obsolete one Non-Nullable types land
# https://dart-lang.github.io/linter/lints/avoid_returning_null_for_future.html
- avoid_returning_null_for_future
# Use empty returns, don't show off with you knowledge about dart internals.
# https://dart-lang.github.io/linter/lints/avoid_returning_null_for_void.html
- avoid_returning_null_for_void
# Hinting you forgot about the cascade operator. But too often you did this on purpose.
# There are plenty of valid reasons to return this.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/avoid_returning_this.html
# - avoid_returning_this
# Prevents logical inconsistencies. It's good practice to define getters for all existing setters.
# https://dart-lang.github.io/linter/lints/avoid_setters_without_getters.html
- avoid_setters_without_getters
# Don't reuse a type parameter when on with the same name already exists in the same scope
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/avoid_shadowing_type_parameters.html
- avoid_shadowing_type_parameters
# A single cascade operator can be replaced with a normal method call
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/avoid_single_cascade_in_expression_statements.html
- avoid_single_cascade_in_expression_statements
# Might cause frame drops because of synchronous file access on mobile, especially on older phones with slow storage.
# There are no known measurements sync access does *not* drop frames.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/avoid_slow_async_io.html
# - avoid_slow_async_io
# Don't use .toString() in production code which might be minified
# Dart SDK: >= 2.10.0-144.0.dev • (Linter v0.1.119)
# https://dart-lang.github.io/linter/lints/avoid_type_to_string.html
- avoid_type_to_string
# Don't use a parameter names which can be confused with a types (i.e. int, bool, num, ...)
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/avoid_types_as_parameter_names.html
- avoid_types_as_parameter_names
# Adding the type is not required, but sometimes improves readability. Therefore removing it doesn't always help
# https://dart-lang.github.io/linter/lints/avoid_types_on_closure_parameters.html
# - avoid_types_on_closure_parameters
# Containers without parameters have no effect and can be removed
# https://dart-lang.github.io/linter/lints/avoid_unnecessary_containers.html
- avoid_unnecessary_containers
# Unused parameters should be removed
# https://dart-lang.github.io/linter/lints/avoid_unused_constructor_parameters.html
- avoid_unused_constructor_parameters
# TODO double check
# For async functions use `Future<void>` as return value, not `void`
# This allows usage of the await keyword and prevents operations from running in parallel.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/avoid_void_async.html
- avoid_void_async
# Flutter mobile only: Web packages aren't available in mobile flutter apps
# https://dart-lang.github.io/linter/lints/avoid_web_libraries_in_flutter.html
- avoid_web_libraries_in_flutter
# Use the await keyword only for futures. There is nothing to await in synchronous code
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/await_only_futures.html
- await_only_futures
# Follow the style guide and use UpperCamelCase for extensions
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/camel_case_extensions.html
- camel_case_extensions
# Follow the style guide and use UpperCamelCase for class names and typedefs
# https://dart-lang.github.io/linter/lints/camel_case_types.html
- camel_case_types
# Prevents leaks and code executing after their lifecycle.
# Discussion https://github.com/passsy/dart-lint/issues/4
#
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/cancel_subscriptions.html
- cancel_subscriptions
# The cascade syntax is weird and you shouldn't be forced to use it.
# False positives:
# https://github.com/dart-lang/linter/issues/1589
#
# https://dart-lang.github.io/linter/lints/cascade_invocations.html
# - cascade_invocations
# Don't cast T? to T. Use ! instead
# Dart SDK: >= 2.11.0-182.0.dev • (Linter v0.1.120)
# https://dart-lang.github.io/linter/lints/cast_nullable_to_non_nullable.html
- cast_nullable_to_non_nullable
# False positives, not reliable enough
# - https://github.com/dart-lang/linter/issues/1381
#
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/close_sinks.html
# - close_sinks
# False positives:
# - https://github.com/dart-lang/linter/issues/1142
#
# https://dart-lang.github.io/linter/lints/comment_references.html
# - comment_references
# Follow standard dart naming style.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/constant_identifier_names.html
- constant_identifier_names
# Prevents hard to debug code
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/control_flow_in_finally.html
- control_flow_in_finally
# Single line `if`s are fine, but when a new line splits the bool expression and body curly braces
# are recommended. It prevents the danging else problem and easily allows the addition of more lines inside
# the if body
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/curly_braces_in_flow_control_structures.html
- curly_braces_in_flow_control_structures
# Still experimental and pretty much work when enforced
# https://dart-lang.github.io/linter/lints/diagnostic_describe_all_properties.html
# - diagnostic_describe_all_properties
# Follows dart style. Fully supported by IDEs and no manual effort for a consistent style
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/directives_ordering.html
- directives_ordering
# String.fromEnvironment looks up env variables at compile time. The variable is baked in by the compiler
# and can't be changed by environment variables.
#
# For dart apps:
# Better look up a environment variable at runtime with Platform.environment
# or use code generation to define variables at compile time.
#
# For Flutter apps:
# String.fromEnvironment is the recommended way to include variables defined with `flutter build --dart-define`
#
# pedantic: disabled
# Dart SDK: >= 2.10.0-0.0.dev • (Linter v0.1.117)
# https://dart-lang.github.io/linter/lints/do_not_use_environment.html
# - do_not_use_environment
# Add a comment why no further error handling is required
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/empty_catches.html
- empty_catches
# Removed empty constructor bodies
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/empty_constructor_bodies.html
- empty_constructor_bodies
# Don't allow empty if bodies. Works together with curly_braces_in_flow_control_structures
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/empty_statements.html
- empty_statements
# Enums aren't powerful enough, now enum like classes get the same linting support
# pedantic: disabled
# Dart SDK: >= 2.9.0-12.0.dev • (Linter v0.1.116)
# https://dart-lang.github.io/linter/lints/exhaustive_cases.html
- exhaustive_cases
# Follow dart file naming schema
# https://dart-lang.github.io/linter/lints/file_names.html
# - file_names
# Very flutter specific, not applicable for all projects
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/flutter_style_todos.html
# - flutter_style_todos # not all todos require a ticket
# hashCode and equals need to be consistent. One can't live without another.
# https://dart-lang.github.io/linter/lints/hash_and_equals.html
- hash_and_equals
# DON'T import implementation files from another package.
# If you need access to some internal code, create an issue
# https://dart-lang.github.io/linter/lints/implementation_imports.html
- implementation_imports
# Although there are some false positives, this lint generally catches unnecessary checks
# - https://github.com/dart-lang/linter/issues/811
#
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/invariant_booleans.html
- invariant_booleans
# Type check for Iterable<T>.contains(other) where other is! T
# otherwise contains will always report false. Those errors are usually very hard to catch.
# https://dart-lang.github.io/linter/lints/iterable_contains_unrelated_type.html
- iterable_contains_unrelated_type
# Hint to join return and assignment.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/join_return_with_assignment.html
- join_return_with_assignment
# Add leading \n which which makes multiline strings easier to read
# Dart SDK: >= 2.8.0-dev.16.0 • (Linter v0.1.113)
# https://dart-lang.github.io/linter/lints/leading_newlines_in_multiline_strings.html
- leading_newlines_in_multiline_strings
# Makes sure a library name is a valid dart identifier.
# This comes in handy for test files combining multiple tests where the file name can be used as identifier
#
# ```
# import src/some_test.dart as some_test;
#
# main() {
# some_test.main();
# }
# ```
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/library_names.html
- library_names
# Follow dart style
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/library_prefixes.html
- library_prefixes
# Nobody wants to manually wrap lines when changing a few words. This rule is too hard to be a "general" rule
# https://dart-lang.github.io/linter/lints/lines_longer_than_80_chars.html
# - lines_longer_than_80_chars
# Type check for List<T>.remove(item) where item is! T
# The list can't contain item. Those errors are not directly obvious especially when refactoring.
# https://dart-lang.github.io/linter/lints/list_remove_unrelated_type.html
- list_remove_unrelated_type
# Good for libraries to prevent unnecessary code paths.
# False positives may occur for applications when boolean properties are generated by external programs
# producing auto-generated source code
#
# Known issue: while(true) loops https://github.com/dart-lang/linter/issues/453
#
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/literal_only_boolean_expressions.html
# - literal_only_boolean_expressions
# Don't forget the whitespaces at the end
# Dart SDK: >= 2.8.0-dev.10.0 • (Linter v0.1.110)
# https://dart-lang.github.io/linter/lints/missing_whitespace_between_adjacent_strings.html
- missing_whitespace_between_adjacent_strings
# Concat Strings obviously with `+` inside a list.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/no_adjacent_strings_in_list.html
- no_adjacent_strings_in_list
# Second case is basically dead code which will never be reached.
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/no_duplicate_case_values.html
- no_duplicate_case_values
# Flutter only: `createState` shouldn't pass information into the state
# https://dart-lang.github.io/linter/lints/no_logic_in_create_state.html
- no_logic_in_create_state
# calling `runtimeType` may be a performance problem
# Dart SDK: >= 2.8.0-dev.10.0 • (Linter v0.1.110)
# https://dart-lang.github.io/linter/lints/no_runtimeType_toString.html
- no_runtimeType_toString
# Follow dart style naming conventions
# https://dart-lang.github.io/linter/lints/non_constant_identifier_names.html
- non_constant_identifier_names
# Generic T might have a value of String or String?. Both are valid.
# This lint triggers when ! is used on T? casting (String?)? to String and not (String?)? to String?
# Dart SDK: >= 2.11.0-182.0.dev • (Linter v0.1.120)
# https://dart-lang.github.io/linter/lints/null_check_on_nullable_type_parameter.html
- null_check_on_nullable_type_parameter
# Might become irrelevant when non-nullable types land in dart. Until then use this lint check which checks for
# non null arguments for specific dart sdk methods.
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/null_closures.html
- null_closures
# Types for local variables may improve readability.
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/omit_local_variable_types.html
# - omit_local_variable_types
# Defining interfaces (abstract classes), with only one method, makes sense architecture wise
# Discussion: https://github.com/passsy/dart-lint/issues/2
#
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/one_member_abstracts.html
# - one_member_abstracts
# Since Errors aren't intended to be caught (see avoid_catching_errors), throwing anything
# doesn't cause trouble.
# https://dart-lang.github.io/linter/lints/only_throw_errors.html
# - only_throw_errors
# Highlights unintentionally overridden fields.
# https://dart-lang.github.io/linter/lints/overridden_fields.html
- overridden_fields
# Only relevant for packages, not applications or general dart code
# https://dart-lang.github.io/linter/lints/package_api_docs.html
# - package_api_docs
# Follow dart style package naming convention
# https://dart-lang.github.io/linter/lints/package_names.html
- package_names
# Seems very rare, especially for applications.
# https://dart-lang.github.io/linter/lints/package_prefixed_library_names.html
- package_prefixed_library_names
# Most likely a mistake, if not: bad practice
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/parameter_assignments.html
- parameter_assignments
# Is contradictory to `no_adjacent_strings_in_list`
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_adjacent_string_concatenation.html
# - prefer_adjacent_string_concatenation
# Makes it easier to migrate to const constructors and to have final fields
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_asserts_in_initializer_lists.html
- prefer_asserts_in_initializer_lists
# Assertions blocks don't require a message because they throw simple to understand errors
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_asserts_with_message.html
# - prefer_asserts_with_message
# Collection literals are shorter. They exists, use them.
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_collection_literals.html
- prefer_collection_literals
# Use the ??= operator when possible
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_conditional_assignment.html
- prefer_conditional_assignment
# Always use const when possible, make runtime faster
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_const_constructors.html
- prefer_const_constructors
# Add a const constructor when possible
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_const_constructors_in_immutables.html
- prefer_const_constructors_in_immutables
# final is good, const is better
# https://dart-lang.github.io/linter/lints/prefer_const_declarations.html
- prefer_const_declarations
# Always use const when possible, make runtime faster
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_const_literals_to_create_immutables.html
- prefer_const_literals_to_create_immutables
# Dart has named constructors. Static methods in other languages (java) are a workaround which don't have
# named constructors.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_constructors_over_static_methods.html
- prefer_constructors_over_static_methods
# Contains may be faster and is easier to read
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_contains.html
- prefer_contains
# Use whatever makes you happy. lint doesn't define a style
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_double_quotes.html
# - prefer_double_quotes
# Prevent confusion with call-side when using named parameters
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_equal_for_default_values.html
- prefer_equal_for_default_values
# Single line methods + implementation makes it hard to write comments for that line.
# Dense code isn't necessarily better code.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_expression_function_bodies.html
# - prefer_expression_function_bodies
# Avoid accidental reassignments and allows the compiler to do optimizations.
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_final_fields.html
- prefer_final_fields
# Helps avoid accidental reassignments and allows the compiler to do optimizations.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_final_in_for_each.html
- prefer_final_in_for_each
# Helps avoid accidental reassignments and allows the compiler to do optimizations.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_final_locals.html
- prefer_final_locals
# Saves lot of code
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_for_elements_to_map_fromIterable.html
- prefer_for_elements_to_map_fromIterable
# Dense code isn't necessarily better code
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_foreach.html
# - prefer_foreach
# As Dart allows local function declarations, it is a good practice to use them in the place of function literals.
# https://dart-lang.github.io/linter/lints/prefer_function_declarations_over_variables.html
- prefer_function_declarations_over_variables
# For consistency
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_generic_function_type_aliases.html
- prefer_generic_function_type_aliases
# Allows potential usage of const
# https://dart-lang.github.io/linter/lints/prefer_if_elements_to_conditional_expressions.html
- prefer_if_elements_to_conditional_expressions
# Dart has a special operator for this, use it
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_if_null_operators.html
- prefer_if_null_operators
# Terser code
# https://dart-lang.github.io/linter/lints/prefer_initializing_formals.html
- prefer_initializing_formals
# Easier move towards const, and way easier to read
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_inlined_adds.html
- prefer_inlined_adds
# There is no argument which makes int literals better than double literals for doubles.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_int_literals.html
# - prefer_int_literals
# Interpolate, use less "", '' and +
# https://dart-lang.github.io/linter/lints/prefer_interpolation_to_compose_strings.html
- prefer_interpolation_to_compose_strings
# Iterables do not necessary know their length
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_is_empty.html
- prefer_is_empty
# Easier to read
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_is_not_empty.html
- prefer_is_not_empty
# Use the `foo is! Foo` instead of `!(foo is Foo)`
# https://dart-lang.github.io/linter/lints/prefer_is_not_operator.html
- prefer_is_not_operator
# Easier to read
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_iterable_whereType.html
- prefer_iterable_whereType
# Users of a 3rd party mixins can't change 3rd party code to use the mixin syntax.
# This makes the rule useless
# https://dart-lang.github.io/linter/lints/prefer_mixin.html
# - prefer_mixin
# Makes expressions with null checks easier to read.
# https://github.com/flutter/flutter/pull/32711#issuecomment-492930932
- prefer_null_aware_operators
# Conflicting with `avoid_relative_lib_imports` which is enforced
# https://dart-lang.github.io/linter/lints/prefer_relative_imports.html
# - prefer_relative_imports
# Use whatever makes you happy. noexcuse doesn't define a style
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_single_quotes.html
# - prefer_single_quotes
# Allows potential usage of const
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/prefer_spread_collections.html
- prefer_spread_collections
# Define types
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/prefer_typing_uninitialized_variables.html
- prefer_typing_uninitialized_variables
# Null is not a type, use void
# https://dart-lang.github.io/linter/lints/prefer_void_to_null.html
- prefer_void_to_null
# Document the replacement API
# https://dart-lang.github.io/linter/lints/provide_deprecation_message.html
- provide_deprecation_message
# Definitely not a rule for standard dart code. Maybe relevant for packages
# https://dart-lang.github.io/linter/lints/public_member_api_docs.html
# - public_member_api_docs
# Hints accidental recursions
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/recursive_getters.html
- recursive_getters
# Flutter only, prefer SizedBox over Container which offers a const constructors
# Dart SDK: >= 2.9.0-4.0.dev • (Linter v0.1.115)
# https://dart-lang.github.io/linter/lints/sized_box_for_whitespace.html
- sized_box_for_whitespace
# Follow dart style use triple slashes
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/slash_for_doc_comments.html
- slash_for_doc_comments
# Flutter only, always put child last
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/sort_child_properties_last.html
- sort_child_properties_last
# Working, results in consistent code. But too opinionated
# Discussion: https://github.com/passsy/dart-lint/issues/1
#
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/sort_constructors_first.html
# - sort_constructors_first
# Any sorting is better than no sorting
# https://dart-lang.github.io/linter/lints/sort_pub_dependencies.html
- sort_pub_dependencies
# Default constructor comes first.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/sort_unnamed_constructors_first.html
- sort_unnamed_constructors_first
# First test, then cast
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/test_types_in_equals.html
- test_types_in_equals
# Hard to debug and bad style
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/throw_in_finally.html
- throw_in_finally
# Help the compiler at compile time with non-null asserts rather than crashing at runtime
# Dart SDK: >= 2.11.0-182.0.dev • (Linter v0.1.120)
# https://dart-lang.github.io/linter/lints/tighten_type_of_initializing_formals.html
- tighten_type_of_initializing_formals
# Type annotations make the compiler intelligent, use them
# https://dart-lang.github.io/linter/lints/type_annotate_public_apis.html
- type_annotate_public_apis
# Don't add types for already typed constructor parameters.
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/type_init_formals.html
- type_init_formals
# Too many false positives.
# Using the pedantic package for the unawaited function doesn't make code better readable
#
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/unawaited_futures.html
# - unawaited_futures
# Remove async/await clutter when not required
# https://dart-lang.github.io/linter/lints/unnecessary_await_in_return.html
- unnecessary_await_in_return
# Remove unnecessary braces
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/unnecessary_brace_in_string_interps.html
- unnecessary_brace_in_string_interps
# Yes, const everywhere. But not in an already const scope
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/unnecessary_const.html
- unnecessary_const
# Disabled because `final` prevents accidental reassignment
# https://dart-lang.github.io/linter/lints/unnecessary_final.html
# - unnecessary_final
# Getter/setters can be added later on in a non API breaking manner
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/unnecessary_getters_setters.html
- unnecessary_getters_setters
# Flutter setState is a good example where a lambda should always be used.
# https://github.com/dart-lang/linter/issues/498
#
# Some generic code sometimes requires lambdas, otherwise the generic type isn't forwarded correctly.
#
# https://dart-lang.github.io/linter/lints/unnecessary_lambdas.html
# - unnecessary_lambdas
# Remove the optional `new` keyword
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/unnecessary_new.html
- unnecessary_new
# Don't assign `null` when value is already `null`.
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/unnecessary_null_aware_assignments.html
- unnecessary_null_aware_assignments
# Remove ! when already non-nullable
# Dart SDK: >= 2.10.0-144.0.dev • (Linter v0.1.119)
# https://dart-lang.github.io/linter/lints/unnecessary_null_checks.html
- unnecessary_null_checks
# Don't assign `null` when value is already `null`.
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/unnecessary_null_in_if_null_operators.html
- unnecessary_null_in_if_null_operators
# If a variable doesn't change and is initialized, no need to define it as nullable (NNDB)
# Dart SDK: >= 2.10.0-10.0.dev • (Linter v0.1.118)
# https://dart-lang.github.io/linter/lints/unnecessary_nullable_for_final_variable_declarations.html
- unnecessary_nullable_for_final_variable_declarations
# Remove overrides which simply call super
# https://dart-lang.github.io/linter/lints/unnecessary_overrides.html
- unnecessary_overrides
# Remove clutter where possible
# https://dart-lang.github.io/linter/lints/unnecessary_parenthesis.html
- unnecessary_parenthesis
# Use raw string only when needed
# Dart SDK: >= 2.8.0-dev.11.0 • (Linter v0.1.111)
# https://dart-lang.github.io/linter/lints/unnecessary_raw_strings.html
- unnecessary_raw_strings
# Avoid magic overloads of + operators
# https://dart-lang.github.io/linter/lints/unnecessary_statements.html
- unnecessary_statements
# Remove unnecessary escape characters
# Dart SDK: >= 2.8.0-dev.11.0 • (Linter v0.1.111)
# https://dart-lang.github.io/linter/lints/unnecessary_string_escapes.html
- unnecessary_string_escapes
# Completely unnecessary code, simplify to save a few CPU cycles
# Dart SDK: >= 2.8.0-dev.10.0 • (Linter v0.1.110)
# https://dart-lang.github.io/linter/lints/unnecessary_string_interpolations.html
- unnecessary_string_interpolations
# The variable is clear, remove clutter
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/unnecessary_this.html
- unnecessary_this
# Highlights potential bugs where unrelated types are compared with another. (always *not* equal).
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/unrelated_type_equality_checks.html
- unrelated_type_equality_checks
# Web only
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/unsafe_html.html
- unsafe_html
# Always use hex syntax Color(0x00000001), never Color(1)
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/use_full_hex_values_for_flutter_colors.html
- use_full_hex_values_for_flutter_colors
# Always use generic function type syntax, don't mix styles
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/use_function_type_syntax_for_parameters.html
- use_function_type_syntax_for_parameters
# Adding a key without using it isn't helpful in applications, only for the Flutter SDK
# Dart SDK: >= 2.8.0-dev.1.0 • (Linter v0.1.108)
# https://dart-lang.github.io/linter/lints/use_key_in_widget_constructors.html
# - use_key_in_widget_constructors
# Some might argue late is a code smell, this lint is very opinionated. It triggers only for private fields and
# therefore might actually cleanup some code.
# There is no performance impact either way https://github.com/dart-lang/linter/pull/2189#discussion_r457945301
# Dart SDK: >= 2.10.0-10.0.dev • (Linter v0.1.118)
# https://dart-lang.github.io/linter/lints/use_late_for_private_fields_and_variables.html
- use_late_for_private_fields_and_variables
# Use rethrow to preserve the original stacktrace.
# https://dart.dev/guides/language/effective-dart/usage#do-use-rethrow-to-rethrow-a-caught-exception
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/use_rethrow_when_possible.html
- use_rethrow_when_possible
# Use the setter syntax
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/use_setters_to_change_properties.html
- use_setters_to_change_properties
# In most cases, using a string buffer is preferred for composing strings due to its improved performance.
# https://dart-lang.github.io/linter/lints/use_string_buffers.html
- use_string_buffers
# Naming is hard, strict rules don't help
# pedantic: disabled
# https://dart-lang.github.io/linter/lints/use_to_and_as_if_applicable.html
# - use_to_and_as_if_applicable
# Catches invalid regular expressions.
# pedantic: enabled
# https://dart-lang.github.io/linter/lints/valid_regexps.html
- valid_regexps
# Don't assign anything to void
# https://dart-lang.github.io/linter/lints/void_checks.html
- void_checks

13
android/.gitignore vendored Normal file
View File

@ -0,0 +1,13 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks

68
android/app/build.gradle Normal file
View File

@ -0,0 +1,68 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
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')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.barcode_absensi"
minSdkVersion 20
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
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
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

View File

@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.barcode_absensi">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@ -0,0 +1,41 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.barcode_absensi">
<application
android:label="barcode_absensi"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>

View File

@ -0,0 +1,6 @@
package com.example.barcode_absensi
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.barcode_absensi">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

29
android/build.gradle Normal file
View File

@ -0,0 +1,29 @@
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}

View File

@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

View File

@ -0,0 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
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

11
android/settings.gradle Normal file
View File

@ -0,0 +1,11 @@
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
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"

33
ios/.gitignore vendored Normal file
View File

@ -0,0 +1,33 @@
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>

View File

@ -0,0 +1 @@
#include "Generated.xcconfig"

View File

@ -0,0 +1 @@
#include "Generated.xcconfig"

View File

@ -0,0 +1,471 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
);
name = Products;
sourceTree = "<group>";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 1100;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Profile;
};
249021D4217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.example.barcodeAbsensi;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.example.barcodeAbsensi;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.example.barcodeAbsensi;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>

View File

@ -0,0 +1,13 @@
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}

View File

@ -0,0 +1,122 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

View File

@ -0,0 +1,5 @@
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
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.

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

49
ios/Runner/Info.plist Normal file
View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>barcode_absensi</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Izin Kamera</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>io.flutter.embedded_views_preview</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1 @@
#import "GeneratedPluginRegistrant.h"

26
lib/main.dart Normal file
View File

@ -0,0 +1,26 @@
// import 'package:barcode_absensi/page/login.dart';
import 'package:barcode_absensi/states/root.dart';
import 'package:barcode_absensi/states/statePetugas.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider(
create: (context) => StatePetugas(),
child: MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Qrcode Scanner',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Root(),
),
);
}
}

View File

@ -0,0 +1,14 @@
// ignore_for_file: type_annotate_public_apis
// ignore_for_file: prefer_typing_uninitialized_variables
// ignore_for_file: non_constant_identifier_names
class Note {
var nik_karyawan;
var nama;
Note({required this.nik_karyawan, required this.nama});
Note.fromJson(Map<String, dynamic> json) {
nik_karyawan = json['nik_karyawan'];
nama = json['nama'];
}
}

222
lib/page/login.dart Normal file
View File

@ -0,0 +1,222 @@
import 'dart:async';
// import 'dart:convert';
import 'package:barcode_absensi/page/scanQRcode.dart';
import 'package:barcode_absensi/states/statePetugas.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
class LoginPage extends StatefulWidget {
@override
_LoginPageState createState() => _LoginPageState();
}
class _LoginPageState extends State<LoginPage> {
bool _isLoading = false;
// bool _login = false;
late SharedPreferences sharedPreferences;
// @override
// void initState() {
// // ignore: todo
// ignore: todo
// // TODO: implement initState
// super.initState();
// checkLoginStatus();
// }
// ignore: always_declare_return_types
// ignore: avoid_void_async
// void checkLoginStatus() async {
// sharedPreferences = await SharedPreferences.getInstance();
// final json = sharedPreferences.getString("dataPetugas");
// final data1 = json != null ? jsonDecode(json) : null;
// // print(data1);
// if (sharedPreferences.getString("dataPetugas") != null) {
// if (data1?['level'] == 'petugas') {
// final StatePetugas _petugas =
// Provider.of<StatePetugas>(context, listen: false);
// try {
// final String _returnString = await _petugas.loginPetugas(
// data1!['username'].toString(), data1!['password'].toString());
// // print(_returnString);
// if (_returnString == 'success') {
// Navigator.pushAndRemoveUntil(
// context,
// MaterialPageRoute(
// builder: (context) => ScanQRCode(),
// ),
// (route) => false);
// } else {
// sharedPreferences.remove('dataPetugas');
// ScaffoldMessenger.of(context).showSnackBar(
// const SnackBar(content: Text('Sila Login Kembali')));
// setState(() {
// // _login = false;
// _isLoading = false;
// });
// }
// } catch (e) {
// // print(e);
// ScaffoldMessenger.of(context).showSnackBar(
// const SnackBar(content: Text('Sila Login Kembali')));
// setState(() {
// _isLoading = false;
// // _login = false;
// });
// }
// }
// }
// }
final _usernameController = TextEditingController();
final _passwordController = TextEditingController();
final GlobalKey<FormState> formkey = GlobalKey<FormState>();
// ignore: avoid_void_async
void _loginPetugas(
{required String username,
required String password,
required BuildContext context}) async {
final StatePetugas _petugas =
Provider.of<StatePetugas>(context, listen: false);
try {
final String _returnString =
await _petugas.loginPetugas(username, password);
setState(() {
_isLoading = false;
});
if (_returnString == 'success') {
// print(_returnString);
// sharedPreferences = await SharedPreferences.getInstance();
// // print(sharedPreferences);
showDialog(
context: context,
builder: (BuildContext context) {
Future.delayed(const Duration(seconds: 2), () {
Navigator.of(context).pop(true);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => ScanQRCode(),
),
(route) => false);
});
return const AlertDialog(
title: Text("Sukses"),
content: Text("Selamat Betugas"),
);
},
);
} else {
ScaffoldMessenger.of(context)
.showSnackBar(SnackBar(content: Text(_returnString.toString())));
}
} catch (e) {
// print(e);
setState(() {
_isLoading = false;
});
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text("Jaringan Bermasalahsadsad")));
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Halaman Login Petugas"),
),
body: Stack(
fit: StackFit.expand,
children: [
Center(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SingleChildScrollView(
child: Form(
key: formkey,
child: _isLoading
? const Center(child: CircularProgressIndicator())
: Column(
children: [
TextFormField(
// focusNode: usernameFocus,
controller: _usernameController,
keyboardType: TextInputType.text,
decoration: const InputDecoration(
border: OutlineInputBorder(),
hintText: "Masukkan Username ",
labelText: "Username",
),
validator: (value) {
if (value!.isEmpty) {
return "Username Harus Terisi";
} else {
return null;
}
},
),
const SizedBox(
height: 20,
),
TextFormField(
// focusNode: passwordFocus,
controller: _passwordController,
keyboardType: TextInputType.text,
obscureText: true,
decoration: const InputDecoration(
border: OutlineInputBorder(),
hintText: "Masukkan Password ",
labelText: "Password",
),
validator: (value) {
if (value!.isEmpty) {
return "Password Harus Terisi";
} else {
return null;
}
},
),
const SizedBox(
height: 20,
),
ElevatedButton(
onPressed: () {
if (formkey.currentState!.validate()) {
setState(() {
_isLoading = true;
});
_loginPetugas(
username: _usernameController.text,
password: _passwordController.text,
context: context,
);
}
},
style: ElevatedButton.styleFrom(
primary: Colors.blue,
onPrimary: Colors.white,
),
child: const Text("Login"),
),
],
),
),
),
),
),
],
),
);
}
}

472
lib/page/pencarian.dart Normal file
View File

@ -0,0 +1,472 @@
import 'dart:convert';
import 'package:barcode_absensi/models/modelKaryawan.dart';
import 'package:barcode_absensi/page/login.dart';
import 'package:barcode_absensi/page/scanQRcode.dart';
import 'package:barcode_absensi/states/statePetugas.dart';
import 'package:barcode_absensi/widgets/myWidgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:http/http.dart' as http;
import 'package:shared_preferences/shared_preferences.dart';
import 'package:provider/provider.dart';
// ignore_for_file: all
class Pencarian extends StatefulWidget {
@override
_PencarianState createState() => _PencarianState();
}
class _PencarianState extends State<Pencarian> {
final int _selectedIndex = 1;
late SharedPreferences sharedPreferences;
// ignore: non_constant_identifier_names
int _cek_list = 1;
// var data;
final List<Note> _notes = <Note>[];
List<Note> _notesForDisplay = <Note>[];
Future<List<Note>> fetchNotes() async {
const url =
'http://192.168.43.125/barcode_absensi_admin/api_server/list_karyawan';
try {
final response = await http.get(Uri.parse(url));
final notes = <Note>[];
if (response.statusCode == 200) {
final notesJson = json.decode(response.body);
for (final noteJson in notesJson) {
notes.add(Note.fromJson(noteJson));
}
setState(() {
_cek_list = 2;
});
return notes;
} else {
setState(() {
_cek_list = 0;
});
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('Jaringan Bermaslah, Sila Coba Kembali')));
throw Exception("Error on server");
}
} on Exception catch (_) {
// print('sini tidak dapat data');
setState(() {
_cek_list = 0;
});
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('Jaringan Bermasalah, Sila Coba Kembali')));
throw Exception("Error on server");
}
}
@override
void initState() {
fetchNotes().then((value) {
setState(() {
_notes.addAll(value);
_notesForDisplay = _notes;
});
});
super.initState();
}
void _onItemTapped(int index) {
if (index == 0) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ScanQRCode(),
));
} else if (index == 1) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Pencarian(),
));
} else {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text("Logout ?"),
content: const Text("Anda Akan Logout Dari Sistem?"),
actions: [
TextButton(
onPressed: () => Navigator.pop(context, false),
child: const Text('Batalkan')),
TextButton(
onPressed: () async {
sharedPreferences =
await SharedPreferences.getInstance();
sharedPreferences.remove('dataPetugas');
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => LoginPage(),
),
(route) => false,
);
},
child: const Text('Ya')),
],
));
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Cari Karyawan"),
actions: [
IconButton(
icon: const Icon(Icons.arrow_back),
onPressed: () => Navigator.pop(context, true)),
],
),
body: (_cek_list == 1)
? const Center(child: CircularProgressIndicator())
: ((_cek_list == 2)
? ListView.builder(
itemBuilder: (context, index) {
return index == 0
? _searchBar()
: _listItem(index, context);
},
itemCount: _notesForDisplay.length + 1,
)
: const Center(
child: Text("Masalah Jaringan, Sila Coba Kembali"))),
drawer: MyDrawer(),
bottomNavigationBar: BottomNavigationBar(
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.camera),
label: 'Scan QRCode',
),
BottomNavigationBarItem(
icon: Icon(Icons.search),
label: 'Pencarian',
),
BottomNavigationBarItem(
icon: Icon(Icons.logout),
label: 'Logout',
),
],
currentIndex: _selectedIndex,
selectedItemColor: Colors.amber[800],
onTap: _onItemTapped,
),
);
}
Padding _searchBar() {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: TextField(
decoration: const InputDecoration(hintText: 'Search...'),
onChanged: (text) {
text = text.toLowerCase();
setState(() {
_notesForDisplay = _notes.where((note) {
final noteTitle = note.nik_karyawan.toLowerCase();
return noteTitle.contains(text);
}).toList();
});
},
),
);
}
Card _listItem(index, context) {
return Card(
child: Slidable(
actionPane: const SlidableDrawerActionPane(),
secondaryActions: [
IconSlideAction(
caption: 'Absensi',
color: Colors.blue,
icon: Icons.archive,
onTap: () => _cek_absensi(
_notesForDisplay[index - 1].nik_karyawan.toString(), context),
),
],
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
_notesForDisplay[index - 1].nik_karyawan.toString(),
style:
const TextStyle(fontSize: 22, fontWeight: FontWeight.bold),
),
Text(
_notesForDisplay[index - 1].nama.toString(),
style: TextStyle(color: Colors.grey.shade600),
),
],
),
),
),
);
}
// ignore: non_constant_identifier_names
Future<void> _cek_absensi(String nik_karyawan, BuildContext context) async {
final StatePetugas _petugas =
Provider.of<StatePetugas>(context, listen: false);
// print(_petugas);
try {
final String _returnString = await _petugas.scanPetugas(nik_karyawan);
sharedPreferences = await SharedPreferences.getInstance();
// print(_returnString);
if (_returnString == 'error') {
alertDialognya('Jaringan Bermasalah111, Sila Coba Kembali');
} else if (_returnString == 'suda_absen') {
final json = jsonDecode(sharedPreferences.getString("errornya")!);
alertDialognya(json['message'].toString());
sharedPreferences.remove('errornya');
} else if (_returnString == 'data_tiada') {
final json = jsonDecode(sharedPreferences.getString("errornya")!);
alertDialognya(json['message'].toString());
sharedPreferences.remove('errornya');
} else {
final data = jsonDecode(_returnString);
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Icon(
Icons.info,
color: Colors.blue,
),
const Text(
'Absensi Karyawan',
style: TextStyle(color: Colors.blue),
)
],
),
actions: [
TextButton(
onPressed: () {
masukkanAbsensi(
data['nik'].toString(),
data['jam_masuk'].toString(),
data['jam_keluar'].toString(),
data['tanggal'].toString(),
context);
},
child: const Text('Masukkan Absensi')),
TextButton(
onPressed: () => Navigator.pop(context, false),
child: const Text('Batalkan')),
],
content: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Text(
'Nama : ',
style: TextStyle(),
textAlign: TextAlign.left,
),
Flexible(
child: Text(
data['nama'].toString(),
style: const TextStyle(),
textAlign: TextAlign.left,
),
),
],
),
const SizedBox(
height: 15,
),
Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Text(
'NIK : ',
style: TextStyle(),
textAlign: TextAlign.left,
),
Flexible(
child: Text(
data['nik'].toString(),
style: const TextStyle(),
textAlign: TextAlign.left,
),
),
],
),
const SizedBox(
height: 15,
),
Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Text(
'Tanggal : ',
style: TextStyle(),
textAlign: TextAlign.left,
),
// ignore: prefer_const_constructors
Flexible(
child: Text(
data['tanggal'].toString(),
style: const TextStyle(),
textAlign: TextAlign.left,
),
),
],
),
const SizedBox(
height: 15,
),
Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Text(
'Jam Masuk : ',
style: TextStyle(),
textAlign: TextAlign.left,
),
Flexible(
child: Text(
data['jam_masuk'].toString(),
style: const TextStyle(),
textAlign: TextAlign.left,
),
),
],
),
const SizedBox(
height: 15,
),
Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Text(
'Jam Keluar : ',
style: TextStyle(),
textAlign: TextAlign.left,
),
Flexible(
child: Text(
data['jam_keluar'].toString(),
style: const TextStyle(),
textAlign: TextAlign.left,
),
),
],
),
const SizedBox(
height: 15,
),
],
),
),
),
);
},
);
}
} catch (e) {
print(e);
alertDialognya('Jaringan Bermasalah222, Sila Coba Kembali');
}
}
void alertDialognya(String message) {
showDialog(
context: context,
builder: (BuildContext context) {
Future.delayed(const Duration(seconds: 5), () {
Navigator.of(context).pop(true);
});
return AlertDialog(
title: Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Icon(
Icons.dangerous,
color: Colors.red,
),
const Text(
'Gagal',
style: TextStyle(color: Colors.red),
)
],
),
content: Text(message),
);
},
);
}
// ignore: avoid_void_async
void masukkanAbsensi(
// ignore: non_constant_identifier_names
String NIK,
String jamMasuk,
String jamKeluar,
String tanggal,
BuildContext context) async {
final StatePetugas _petugas =
Provider.of<StatePetugas>(context, listen: false);
Navigator.pop(context, true);
try {
final String _returnString =
await _petugas.absensiPetugas(NIK, jamMasuk, jamKeluar, tanggal);
if (_returnString == 'success') {
showDialog(
context: context,
builder: (BuildContext context) {
Future.delayed(const Duration(seconds: 6), () {
Navigator.of(context).pop(true);
});
return AlertDialog(
title: Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Icon(Icons.info, color: Colors.blue),
const Text(
'Sukses',
style: TextStyle(color: Colors.blue),
)
],
),
content: const Text("Karyawan Sukses Diabsensi"),
);
},
);
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Karyawan Sukses Diabsensi')));
} else {
alertDialognya('Jaringan Bermasalah333, Sila Coba Kembali');
}
} catch (e) {
print(e);
}
}
}
// ignore: non_constant_identifier_names

401
lib/page/scanQRcode.dart Normal file
View File

@ -0,0 +1,401 @@
import 'dart:convert';
import 'package:barcode_absensi/page/login.dart';
import 'package:barcode_absensi/page/pencarian.dart';
import 'package:barcode_absensi/states/statePetugas.dart';
import 'package:barcode_absensi/widgets/myWidgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
class ScanQRCode extends StatefulWidget {
@override
_ScanQRCodeState createState() => _ScanQRCodeState();
}
class _ScanQRCodeState extends State<ScanQRCode> {
final int _selectedIndex = 0;
late SharedPreferences sharedPreferences;
@override
void initState() {
super.initState();
}
void _onItemTapped(int index) {
// if (index == 1) {
// print('sini logout');
// }
// setState(() {
// _selectedIndex = index;
// });
if (index == 0) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ScanQRCode(),
));
} else if (index == 1) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Pencarian(),
));
} else {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text("Logout ?"),
content: const Text("Anda Akan Logout Dari Sistem?"),
actions: [
TextButton(
onPressed: () => Navigator.pop(context, false),
child: const Text('Batalkan')),
TextButton(
onPressed: () async {
sharedPreferences =
await SharedPreferences.getInstance();
sharedPreferences.remove('dataPetugas');
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => LoginPage(),
),
(route) => false,
);
},
child: const Text('Ya')),
],
));
}
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: _onWillPop,
child: Scaffold(
appBar: AppBar(
title: const Text("Halaman Scan QR-Code"),
),
body: const Center(
child: Text(
"Tekan tombol kamera pada sebelah kanan bawah skrin untuk scan QRCode karyawan",
textAlign: TextAlign.center,
),
),
drawer: MyDrawer(),
floatingActionButton: FloatingActionButton(
onPressed: () => AbsensiScanner(context),
child: const Icon(Icons.center_focus_strong),
),
bottomNavigationBar: BottomNavigationBar(
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.camera),
label: 'Scan QRCode',
),
BottomNavigationBarItem(
icon: Icon(Icons.search),
label: 'Pencarian',
),
BottomNavigationBarItem(
icon: Icon(Icons.logout),
label: 'Logout',
),
],
currentIndex: _selectedIndex,
selectedItemColor: Colors.amber[800],
onTap: _onItemTapped,
),
),
);
}
Future<bool> _onWillPop() async {
bool ini = false;
await showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text("Keluar"),
content: const Text("Yakin Ingin Keluar Dari Aplikasi ?"),
actions: [
TextButton(
onPressed: () => Navigator.pop(context, false),
child: const Text('No')),
TextButton(
onPressed: () {
SystemChannels.platform
.invokeMethod('SystemNavigator.pop');
ini = true;
},
child: const Text('Yes')),
],
));
return ini;
}
// ignore: non_constant_identifier_names
Future<void> AbsensiScanner(BuildContext context) async {
// print("hehe");
final StatePetugas _petugas =
Provider.of<StatePetugas>(context, listen: false);
try {
final qrCode = await FlutterBarcodeScanner.scanBarcode(
'#ff6666', 'Cancel', true, ScanMode.QR);
// print(qrCode);
try {
final String _returnString =
await _petugas.scanPetugas(qrCode.toString());
sharedPreferences = await SharedPreferences.getInstance();
// print(_returnString);
if (_returnString == 'error') {
alertDialognya('Jaringan Bermasalah111, Sila Coba Kembali');
} else if (_returnString == 'suda_absen') {
final json = jsonDecode(sharedPreferences.getString("errornya")!);
alertDialognya(json['message'].toString());
sharedPreferences.remove('errornya');
} else if (_returnString == 'data_tiada') {
final json = jsonDecode(sharedPreferences.getString("errornya")!);
alertDialognya(json['message'].toString());
sharedPreferences.remove('errornya');
} else {
final data = jsonDecode(_returnString);
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Icon(
Icons.info,
color: Colors.blue,
),
const Text(
'Absensi Karyawan',
style: TextStyle(color: Colors.blue),
)
],
),
actions: [
TextButton(
onPressed: () {
masukkanAbsensi(
data['nik'].toString(),
data['jam_masuk'].toString(),
data['jam_keluar'].toString(),
data['tanggal'].toString(),
context);
},
child: const Text('Masukkan Absensi')),
TextButton(
onPressed: () => Navigator.pop(context, false),
child: const Text('Batalkan')),
],
content: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Text(
'Nama : ',
style: TextStyle(),
textAlign: TextAlign.left,
),
Flexible(
child: Text(
data['nama'].toString(),
style: const TextStyle(),
textAlign: TextAlign.left,
),
),
],
),
const SizedBox(
height: 15,
),
Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Text(
'NIK : ',
style: TextStyle(),
textAlign: TextAlign.left,
),
Flexible(
child: Text(
data['nik'].toString(),
style: const TextStyle(),
textAlign: TextAlign.left,
),
),
],
),
const SizedBox(
height: 15,
),
Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Text(
'Tanggal : ',
style: TextStyle(),
textAlign: TextAlign.left,
),
// ignore: prefer_const_constructors
Flexible(
child: Text(
data['tanggal'].toString(),
style: const TextStyle(),
textAlign: TextAlign.left,
),
),
],
),
const SizedBox(
height: 15,
),
Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Text(
'Jam Masuk : ',
style: TextStyle(),
textAlign: TextAlign.left,
),
Flexible(
child: Text(
data['jam_masuk'].toString(),
style: const TextStyle(),
textAlign: TextAlign.left,
),
),
],
),
const SizedBox(
height: 15,
),
Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Text(
'Jam Keluar : ',
style: TextStyle(),
textAlign: TextAlign.left,
),
Flexible(
child: Text(
data['jam_keluar'].toString(),
style: const TextStyle(),
textAlign: TextAlign.left,
),
),
],
),
const SizedBox(
height: 15,
),
],
),
),
),
);
},
);
}
} catch (e) {
print(e);
alertDialognya('Jaringan Bermasalah222, Sila Coba Kembali');
}
} catch (e) {
alertDialognya('Scanner Barcode Gagal Berfungsi');
}
// return 'hehe';
}
// ignore: avoid_void_async
void masukkanAbsensi(
// ignore: non_constant_identifier_names
String NIK,
String jamMasuk,
String jamKeluar,
String tanggal,
BuildContext context) async {
final StatePetugas _petugas =
Provider.of<StatePetugas>(context, listen: false);
Navigator.pop(context, true);
try {
final String _returnString =
await _petugas.absensiPetugas(NIK, jamMasuk, jamKeluar, tanggal);
if (_returnString == 'success') {
showDialog(
context: context,
builder: (BuildContext context) {
Future.delayed(const Duration(seconds: 6), () {
Navigator.of(context).pop(true);
});
return AlertDialog(
title: Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Icon(Icons.info, color: Colors.blue),
const Text(
'Sukses',
style: TextStyle(color: Colors.blue),
)
],
),
content: const Text("Karyawan Sukses Diabsensi"),
);
},
);
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Karyawan Sukses Diabsensi')));
} else {
alertDialognya('Jaringan Bermasalah333, Sila Coba Kembali');
}
} catch (e) {
print(e);
}
}
// ignore: always_declare_return_types
void alertDialognya(String message) {
showDialog(
context: context,
builder: (BuildContext context) {
Future.delayed(const Duration(seconds: 5), () {
Navigator.of(context).pop(true);
});
return AlertDialog(
title: Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
const Icon(
Icons.dangerous,
color: Colors.red,
),
const Text(
'Gagal',
style: TextStyle(color: Colors.red),
)
],
),
content: Text(message),
);
},
);
}
}

94
lib/states/root.dart Normal file
View File

@ -0,0 +1,94 @@
// import 'dart:async';
import 'dart:convert';
import 'package:barcode_absensi/page/login.dart';
import 'package:barcode_absensi/page/scanQRcode.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:barcode_absensi/states/statePetugas.dart';
class Root extends StatefulWidget {
// Root({Key key}) : super(key: key);
@override
_RootState createState() => _RootState();
}
class _RootState extends State<Root> {
late SharedPreferences sharedPreferences;
int _isLoading = 0;
@override
// ignore: avoid_void_async
void didChangeDependencies() async {
super.didChangeDependencies();
sharedPreferences = await SharedPreferences.getInstance();
final json = sharedPreferences.getString("dataPetugas");
final data1 = json != null ? jsonDecode(json) : null;
// print(data1);
if (sharedPreferences.getString("dataPetugas") != null) {
if (data1?['level'] == 'petugas') {
final StatePetugas _petugas =
Provider.of<StatePetugas>(context, listen: false);
try {
final String _returnString = await _petugas.loginPetugas(
data1!['username'].toString(), data1!['password'].toString());
// print(_returnString);
if (_returnString == 'success') {
setState(() {
// _login = false;
_isLoading = 2;
});
} else {
sharedPreferences.remove('dataPetugas');
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Sila Login Kembali')));
setState(() {
// _login = false;
_isLoading = 1;
});
}
} catch (e) {
// print(e);
sharedPreferences.remove('dataPetugas');
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Sila Login Kembali')));
setState(() {
_isLoading = 1;
// _login = false;
});
}
}
} else {
setState(() {
// _login = false;
_isLoading = 1;
});
}
}
@override
Widget build(BuildContext context) {
late Widget retVal;
switch (_isLoading) {
case 0:
retVal = Scaffold(
appBar: AppBar(
title: const Text("Loading"),
),
body: const Center(child: CircularProgressIndicator()),
);
break;
case 1:
retVal = LoginPage();
break;
case 2:
retVal = ScanQRCode();
break;
}
return retVal;
}
}

View File

@ -0,0 +1,112 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
import 'package:shared_preferences/shared_preferences.dart';
class StatePetugas extends ChangeNotifier {
Future<String> loginPetugas(String username, String password) async {
// ignore: prefer_final_locals
String retVal = "error";
try {
// ignore: prefer_final_locals
var uri = Uri.parse(
// ignore: prefer_interpolation_to_compose_strings
"http://192.168.43.125/barcode_absensi_admin/api_server/login_petugas?username=" +
username +
"&password=" +
password);
// ignore: prefer_final_locals
var response = await http.get(uri);
final SharedPreferences sharedPreferences =
await SharedPreferences.getInstance();
switch (response.statusCode) {
case 200:
sharedPreferences.setString('dataPetugas', response.body);
retVal = "success";
break;
case 401:
final detail = jsonDecode(response.body);
retVal = detail['message'].toString();
break;
default:
}
} catch (e) {
print(e);
retVal = "Masalah Jaringan";
}
return retVal;
}
Future<String> scanPetugas(String qrcode) async {
String retVal = "error";
try {
final uri = Uri.parse(
// ignore: prefer_interpolation_to_compose_strings
"http://192.168.43.125/barcode_absensi_admin/api_server/cek_karyawan_by_qrcode?nik=" +
qrcode);
final SharedPreferences sharedPreferences =
await SharedPreferences.getInstance();
final response = await http.get(uri);
final data = response.body;
switch (response.statusCode) {
case 200:
retVal = data;
break;
case 401:
retVal = 'suda_absen';
sharedPreferences.setString('errornya', data);
break;
case 404:
retVal = 'data_tiada';
sharedPreferences.setString('errornya', data);
break;
}
} catch (e) {
print(e);
retVal = "error";
}
// print(uri);
return retVal;
}
Future<String> absensiPetugas(
String nik, String jamMasuk, String jamKeluar, String tanggal) async {
String retVal = 'error';
try {
final uri = Uri.parse(
// ignore: prefer_interpolation_to_compose_strings
"http://192.168.43.125/barcode_absensi_admin/api_server/absensi_karyawan");
final response = await http.post(
uri,
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
body: jsonEncode(<String, String>{
'nik_karyawan': nik,
'jam_masuk': jamMasuk,
'jam_keluar': jamKeluar,
'tanggal': tanggal,
}),
);
// final data = response.body;
// print(data);
switch (response.statusCode) {
case 200:
retVal = 'success';
break;
default:
retVal = 'error';
}
} catch (e) {
print(e);
retVal = 'error';
}
return retVal;
}
}

View File

@ -0,0 +1,84 @@
import 'package:barcode_absensi/page/login.dart';
import 'package:barcode_absensi/page/pencarian.dart';
import 'package:barcode_absensi/page/scanQRcode.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
// ignore: must_be_immutable
class MyDrawer extends StatelessWidget {
late SharedPreferences sharedPreferences;
@override
Widget build(BuildContext context) {
return Drawer(
child: ListView(
padding: const EdgeInsets.all(0),
children: <Widget>[
// ignore: sized_box_for_whitespace
Container(
height: 80.0,
child: const DrawerHeader(
decoration: BoxDecoration(color: Colors.blue),
margin: EdgeInsets.all(0.0),
padding: EdgeInsets.all(0.0),
child: Align(
child: Text(
"Barcode Absensi",
style: TextStyle(color: Colors.white),
),
),
),
),
ListTile(
leading: const Icon(Icons.camera),
title: const Text('Scan Barcode'),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ScanQRCode(),
)),
),
ListTile(
leading: const Icon(Icons.search_sharp),
title: const Text('Pencarian NIK / Nama'),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Pencarian(),
)),
),
ListTile(
leading: const Icon(Icons.logout),
title: const Text('Logout'),
onTap: () {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text("Logoout ?"),
content: const Text("Anda Akan Logout Dari Sistem?"),
actions: [
TextButton(
onPressed: () => Navigator.pop(context, false),
child: const Text('Batalkan')),
TextButton(
onPressed: () async {
sharedPreferences =
await SharedPreferences.getInstance();
sharedPreferences.remove('dataPetugas');
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => LoginPage(),
),
(route) => false,
);
},
child: const Text('Ya')),
],
));
},
),
],
),
);
}
}

334
pubspec.lock Normal file
View File

@ -0,0 +1,334 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_barcode_scanner:
dependency: "direct main"
description:
name: flutter_barcode_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
flutter_slidable:
dependency: "direct main"
description:
name: flutter_slidable
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
http:
dependency: "direct main"
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.1"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.11.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.1"
provider:
dependency: "direct main"
description:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
sdks:
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.20.0"

87
pubspec.yaml Normal file
View File

@ -0,0 +1,87 @@
name: barcode_absensi
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
cupertino_icons: ^1.0.2
flutter:
sdk: flutter
flutter_barcode_scanner: ^2.0.0
flutter_slidable: ^0.6.0
http: ^0.13.1
provider: ^5.0.0
# qr_code_scanner: ^0.4.0
shared_preferences: ^2.0.5
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages

30
test/widget_test.dart Normal file
View File

@ -0,0 +1,30 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:barcode_absensi/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}

BIN
web/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

BIN
web/icons/Icon-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
web/icons/Icon-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

98
web/index.html Normal file
View File

@ -0,0 +1,98 @@
<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
-->
<base href="/">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="barcode_absensi">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<title>barcode_absensi</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
var serviceWorkerVersion = null;
var scriptLoaded = false;
function loadMainDartJs() {
if (scriptLoaded) {
return;
}
scriptLoaded = true;
var scriptTag = document.createElement('script');
scriptTag.src = 'main.dart.js';
scriptTag.type = 'application/javascript';
document.body.append(scriptTag);
}
if ('serviceWorker' in navigator) {
// Service workers are supported. Use them.
window.addEventListener('load', function () {
// Wait for registration to finish before dropping the <script> tag.
// Otherwise, the browser will load the script multiple times,
// potentially different versions.
var serviceWorkerUrl = 'flutter_service_worker.js?v=' + serviceWorkerVersion;
navigator.serviceWorker.register(serviceWorkerUrl)
.then((reg) => {
function waitForActivation(serviceWorker) {
serviceWorker.addEventListener('statechange', () => {
if (serviceWorker.state == 'activated') {
console.log('Installed new service worker.');
loadMainDartJs();
}
});
}
if (!reg.active && (reg.installing || reg.waiting)) {
// No active web worker and we have installed or are installing
// one for the first time. Simply wait for it to activate.
waitForActivation(reg.installing ?? reg.waiting);
} else if (!reg.active.scriptURL.endsWith(serviceWorkerVersion)) {
// When the app updates the serviceWorkerVersion changes, so we
// need to ask the service worker to update.
console.log('New service worker available.');
reg.update();
waitForActivation(reg.installing);
} else {
// Existing service worker is still good.
console.log('Loading app from service worker.');
loadMainDartJs();
}
});
// If service worker doesn't succeed in a reasonable amount of time,
// fallback to plaint <script> tag.
setTimeout(() => {
if (!scriptLoaded) {
console.warn(
'Failed to load app from service worker. Falling back to plain <script> tag.',
);
loadMainDartJs();
}
}, 4000);
});
} else {
// Service workers not supported. Just drop the <script> tag.
loadMainDartJs();
}
</script>
</body>
</html>

23
web/manifest.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "barcode_absensi",
"short_name": "barcode_absensi",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}