Skip to content

Instantly share code, notes, and snippets.

View AleksandarSavic95's full-sized avatar

Aleksandar Savic AleksandarSavic95

  • Serbia
View GitHub Profile
@AleksandarSavic95
AleksandarSavic95 / credit_card_input_formatters.dart
Created January 5, 2022 17:30
Flutter TextInputFormatter for credit card number and expiry date
// Modified from https://youtu.be/4v4l6E8Sbj8?t=1025 (at around 17:05)
import 'package:flutter/services.dart';
/// A [TextInputFormatter] for the credit card number. Adds space after every four characters.
class CreditCardInputFormatter extends TextInputFormatter {
final separator = ' ';
@override
TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
return textManipulation(
@AleksandarSavic95
AleksandarSavic95 / bottom_app_bar_with_stack_NO_notched_fab.dart
Created October 16, 2020 11:55
Bottom APP bar done via Stack widget - issue: no Notched FAB available.. `Stack` helps move the BottomAppBar down below the line of SafeArea by using a negative value for `Positioned`'s `bottom` property.
// Bottom APP bar done via Stack widget - issue: no Notched FAB available..
// `Stack` helps move the BottomAppBar down below the line of SafeArea by
// using a negative value for `Positioned`'s `bottom` property.
//
//// TAKEN FROM:
// SafeArea around Scaffold with BottomNavigationBar -> How to remove Bar elevation?
// https://github.com/flutter/flutter/issues/21688
import 'package:flutter/material.dart';
@AleksandarSavic95
AleksandarSavic95 / button_with_centered_text_and_image.dart
Last active February 13, 2020 11:20
Flutter's `RaisedButton` with text centered, and an image besides it. Like this: https://i.stack.imgur.com/9LT1K.png
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Created by: AleksandarSavic95
// Created as an answer to this question:
// https://stackoverflow.com/q/49442247/2101117
//
// Description: Flutter's `RaisedButton` with text centered,
// and an image besides it. Like this: https://i.stack.imgur.com/9LT1K.png
@AleksandarSavic95
AleksandarSavic95 / Dependency tree.txt
Created June 8, 2018 09:16
Dependency tree of the pom.xml file for spring-drools integration --> https://gist.github.com/AleksandarSavic95/5e6514356ac181ed5544e841f440b9f3
[INFO] --- maven-dependency-plugin:3.0.1:tree (default-cli) @ siem ---
[INFO] ftn.bsep9:siem:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-jersey:jar:2.0.0.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.0.RELEASE:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
@AleksandarSavic95
AleksandarSavic95 / spring drools integration, kie pom.xml
Created June 8, 2018 09:13
Versions for various Maven artifacts which happen to work well together. A lot of time trial and error has been spent, so feel free to comment and ask anything You want :)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ftn.bsep9</groupId>
<artifactId>siem</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>